forked from theintern/intern
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.html
65 lines (62 loc) · 2.48 KB
/
client.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Hey you, listen up:
____ _ __ __ __
/ __ \____ ____ ( )/ /_ / /_____ __ _______/ /_
/ / / / __ \/ __ \|// __/ / __/ __ \/ / / / ___/ __ \
/ /_/ / /_/ / / / / / /_ / /_/ /_/ / /_/ / /__/ / / /
/_____/\____/_/ /_/ \__/ \__/\____/\__,_/\___/_/ /_/
__ __ _ _____ __ __
/ /_/ /_ (_)____ / __(_) /__ / / Direct modifications to client.html are unsupported and will cause
/ __/ __ \/ / ___/ / /_/ / / _ \/ / Intern to break when you upgrade to a new version. If you need to
/ /_/ / / / (__ ) / __/ / / __/_/ add things to the page, do it from the `setup` or `before` method
\__/_/ /_/_/____/ /_/ /_/_/\___(_) of the test suite that needs those things. NEVER do it here!
-->
<title>Browser test runner</title>
<script src="browser_modules/dojo/loader.js"></script>
<script>
// At least FirefoxDriver 2.46.0 will time out the page load detection and cause the page to reload in the
// middle of test module initialisation if a large number of tests are loaded before the onload event for
// the page has fired. See theintern/intern#466.
window.onload = function () {
var internPath = location.pathname.replace(/\/+[^\/]*$/, '/');
var initialBaseUrl = (function () {
var result = /[?&]initialBaseUrl=([^&]*)/.exec(location.search);
if (result) {
var baseUrl = decodeURIComponent(result[1]);
if (/^(?:\w+:)?\/\//.test(baseUrl)) {
throw new Error('Cross-origin loading of test modules is not allowed for security reasons');
}
return baseUrl;
}
else {
// For users running client.html directly, assume that the initial base URL is two levels up
// (the parent directory of node_modules/intern); this is most common.
// Users that need something special can provide a different `initialBaseUrl`.
return internPath.replace(/(?:\/+[^\/]*){2}\/?$/, '/');
}
})();
var internConfig = this.__internConfig = {
baseUrl: initialBaseUrl,
packages: [
{ name: 'intern', location: internPath }
],
map: {
intern: {
dojo: 'intern/browser_modules/dojo',
chai: 'intern/browser_modules/chai/chai',
diff: 'intern/browser_modules/diff/diff'
},
'*': {
'intern/dojo': 'intern/browser_modules/dojo'
}
}
};
require(internConfig, [ 'intern/client' ]);
};
</script>
</head>
<body></body>
</html>