blob: 97af584ec0f045663811467cc30e16287932fb2a (
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
|
<script>
function ok(a, msg) {
parent.postMessage({ type: "check", status: !!a, message: msg }, "*");
}
function is(a, b, msg) {
ok(a === b, msg);
}
function testObserver() {
ok("FetchObserver" in self, "We have a FetchObserver prototype");
fetch('data:,foo', { observe: o => {
}});
}
var steps = [
testObserver,
];
function next() {
if (!steps.length) {
parent.postMessage({ type: "finish" }, "*");
return;
}
var step = steps.shift();
step();
}
next();
</script>
|