Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: LayoutTests/crypto/gc-3.html

Issue 215763002: [webcrypto] Add layout tests for garbage collection of custom properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Modifications for Blink Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/crypto/gc-2-expected.txt ('k') | LayoutTests/crypto/gc-3-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/gc-3.html
diff --git a/LayoutTests/crypto/gc-3.html b/LayoutTests/crypto/gc-3.html
new file mode 100644
index 0000000000000000000000000000000000000000..fcf2f369fe53e600f28173c5084e962b3972e263
--- /dev/null
+++ b/LayoutTests/crypto/gc-3.html
@@ -0,0 +1,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>
« no previous file with comments | « LayoutTests/crypto/gc-2-expected.txt ('k') | LayoutTests/crypto/gc-3-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698