44 lines
858 B
HTML
44 lines
858 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
|
|
description("Test that window.crypto wrapper protects all dependencies, so it can always be used to get 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>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|