Bug 1909074. Don't pass OFFSET_BY_ORIGIN to GetResultingTransformMatrix when it's...
[gecko.git] / layout / style / test / test_asyncopen.html
blob9a52ea37eb739af05f86cdeb9266d9f1832dd0a9
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=1195173
5 -->
6 <head>
7 <title>Bug 1195173 - Test asyncOpen security exception</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <!-- Note: the following stylesheet does not exist -->
12 <link rel="stylesheet" id="myCSS" type="text/css" href="file:///home/foo/bar.css">
14 </head>
15 <body onload="checkCSS()">
16 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1195173">Mozilla Bug 1195173</a>
17 <p id="display"></p>
18 <div id="content" style="display: none"></div>
20 <script type="application/javascript">
22 * Description of the test:
23 * Accessing a stylesheet that got blocked by asyncOpen should
24 * throw an exception.
27 SimpleTest.waitForExplicitFinish();
29 function checkCSS()
31 try {
32 // accessing tests/SimpleTest/test.css should not throw
33 var goodCSS = document.styleSheets[0].cssRules
34 ok(true, "accessing test.css should be allowed");
36 catch(e) {
37 ok(false, "accessing test.css should be allowed");
40 try {
41 // accessing file:///home/foo/bar.css should throw
42 var badCSS = document.styleSheets[1].cssRules
43 ok(false, "accessing bar.css should throw");
45 catch(e) {
46 ok(true, "accessing bar.css should throw");
49 SimpleTest.finish();
52 </script>
53 </body>
54 </html>