forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gc-3.html
43 lines (36 loc) · 841 Bytes
/
gc-3.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../resources/js-test.js"></script>
<script src="../resources/gc.js"></script>
</head>
<body>
<script>
description("Test that window.crypto wrapper protects all dependencies, so it can always be used to create crypto.subtle.");
jsTestIsAsync = true;
var anotherWindowCrypto;
function startTest()
{
anotherWindowCrypto = frames[0].crypto;
shouldBeDefined(anotherWindowCrypto);
document.body.removeChild(document.getElementsByTagName("iframe")[0]);
gc();
setTimeout(continueTest, 10);
}
function continueTest()
{
gc();
setTimeout(finishTest, 10);
}
function finishTest()
{
gc();
shouldBeDefined(anotherWindowCrypto.subtle);
finishJSTest();
}
window.onload = startTest;
</script>
<iframe src="about:blank"></iframe>
</body>
</html>