crypto-gc.html 610 Bytes
Newer Older
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
<!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 preserves custom properties.");
jsTestIsAsync = true;

function startTest()
{
    window.crypto.foo = "bar";
    gc();
    setTimeout(continueTest, 10);
}

function continueTest()
{
    gc();
    setTimeout(finishTest, 10);
}

function finishTest()
{
    gc();
    shouldBe('window.crypto.foo', '"bar"');
    finishJSTest();
}

window.onload = startTest;

</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>