blob: e98818d6f270db202c5ba72cbff8a45df8ede1d9 (
plain)
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
|
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Worklet</title>
<script type="application/javascript" src="common.js"></script>
</head>
<body>
<script type="application/javascript">
setupTest();
var worklet = window.createWorklet();
ok(!!worklet, "We have a Worklet");
function loading() {
worklet.import("server_import_with_cache.sjs")
.then(() => {
ok(true, "Import should load a resource.");
}, () => {
ok(false, "Import should load a resource.");
})
.then(() => {
done();
});
}
var count = 0;
const MAX = 10;
function done() {
if (++count == MAX) {
SimpleTest.finish();
}
}
for (var i = 0; i < MAX; ++i) {
loading();
}
</script>
</body>
</html>
|