1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/bugs/test_bug927901.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=927901 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 927901</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 + <script type="application/javascript"> 1.15 + 1.16 + /** Test for Bug 927901 **/ 1.17 + SimpleTest.waitForExplicitFinish(); 1.18 + 1.19 + var counter = 0; 1.20 + window.onmessage = function(e) { 1.21 + ++counter; 1.22 + is(e.data, "pass", "Accessing window.crypto.getRandomValues in the iframe should have succeeded!"); 1.23 + if (counter == 1) { 1.24 + document.getElementById("testiframe").src = 1.25 + "http://mochi.test:8888/tests/dom/tests/mochitest/bugs/file_bug927901.html " 1.26 + } else if (counter == 2) { 1.27 + SimpleTest.finish(); 1.28 + } 1.29 + } 1.30 + 1.31 + </script> 1.32 +</head> 1.33 +<body> 1.34 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=927901">Mozilla Bug 927901</a> 1.35 +<p id="display"></p> 1.36 +<div id="content" style="display: none"> 1.37 + 1.38 +</div> 1.39 +<pre id="test"> 1.40 +</pre> 1.41 +<iframe id="testiframe" src="http://test1.example.org:8000/tests/dom/tests/mochitest/bugs/file_bug927901.html"></iframe> 1.42 +</body> 1.43 +</html>