1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/permission/tests/test_browser.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=815105 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 815105 </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 +</head> 1.15 +<body> 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=815105">Mozilla Bug 815105 </a> 1.17 +<p id="display"></p> 1.18 +<div id="content" style="display: none"></div> 1.19 +<pre id="test"> 1.20 +<script type="application/javascript;version=1.8" src="file_framework.js"></script> 1.21 +<script type="application/javascript;version=1.8"> 1.22 +function verifier(success, failure) { 1.23 + var iframe = document.createElement('iframe'); 1.24 + iframe.setAttribute('mozbrowser', 'true'); 1.25 + iframe.src = "http://example.org/"; 1.26 + iframe.addEventListener('load', function() { 1.27 + iframe.removeEventListener('load', arguments.callee); 1.28 + 1.29 + if (iframe.getScreenshot && typeof iframe.getScreenshot == "function") { 1.30 + success("Got mozbrowser"); 1.31 + } else { 1.32 + failure("Didn't get mozbrowser") ; 1.33 + } 1.34 + }); 1.35 + 1.36 + document.getElementById('content').appendChild(iframe); 1.37 +} 1.38 + 1.39 +var gData = [ 1.40 + { 1.41 + perm: ["browser"], 1.42 + needParentPerm: true, 1.43 + settings: [["dom.mozBrowserFramesEnabled", true]], 1.44 + verifier: verifier.toSource(), 1.45 + } 1.46 +] 1.47 +</script> 1.48 +</pre> 1.49 +</body> 1.50 +</html> 1.51 +