|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=815105 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 815105 </title> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
11 </head> |
|
12 <body> |
|
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=815105">Mozilla Bug 815105 </a> |
|
14 <p id="display"></p> |
|
15 <div id="content" style="display: none"></div> |
|
16 <pre id="test"> |
|
17 <script type="application/javascript;version=1.8" src="file_framework.js"></script> |
|
18 <script type="application/javascript;version=1.8"> |
|
19 function verifier(success, failure) { |
|
20 var iframe = document.createElement('iframe'); |
|
21 iframe.setAttribute('mozbrowser', 'true'); |
|
22 iframe.src = "http://example.org/"; |
|
23 iframe.addEventListener('load', function() { |
|
24 iframe.removeEventListener('load', arguments.callee); |
|
25 |
|
26 if (iframe.getScreenshot && typeof iframe.getScreenshot == "function") { |
|
27 success("Got mozbrowser"); |
|
28 } else { |
|
29 failure("Didn't get mozbrowser") ; |
|
30 } |
|
31 }); |
|
32 |
|
33 document.getElementById('content').appendChild(iframe); |
|
34 } |
|
35 |
|
36 var gData = [ |
|
37 { |
|
38 perm: ["browser"], |
|
39 needParentPerm: true, |
|
40 settings: [["dom.mozBrowserFramesEnabled", true]], |
|
41 verifier: verifier.toSource(), |
|
42 } |
|
43 ] |
|
44 </script> |
|
45 </pre> |
|
46 </body> |
|
47 </html> |
|
48 |