Index: LayoutTests/crypto/gc-2.html |
diff --git a/LayoutTests/crypto/gc-2.html b/LayoutTests/crypto/gc-2.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..97726c3f51dd3195debd90de312cce41a3b5093a |
--- /dev/null |
+++ b/LayoutTests/crypto/gc-2.html |
@@ -0,0 +1,46 @@ |
+<!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.subtle wrapper preserves custom properties."); |
+jsTestIsAsync = true; |
+ |
+var anotherWindowCrypto; |
+ |
+function startTest() |
+{ |
+ anotherWindowCrypto = frames[0].crypto; |
+ shouldBeDefined(anotherWindowCrypto); |
+ shouldBeDefined(anotherWindowCrypto.subtle); |
+ |
+ anotherWindowCrypto.subtle.foo = "bar"; |
+ document.body.removeChild(document.getElementsByTagName("iframe")[0]); |
+ gc(); |
+ setTimeout(continueTest, 10); |
+} |
+ |
+function continueTest() |
+{ |
+ gc(); |
+ setTimeout(finishTest, 10); |
+} |
+ |
+function finishTest() |
+{ |
+ gc(); |
+ shouldBe('anotherWindowCrypto.subtle.foo', '"bar"'); |
+ finishJSTest(); |
+} |
+ |
+window.onload = startTest; |
+ |
+</script> |
+<iframe src="about:blank"></iframe> |
+</body> |
+</html> |