4 https://bugzilla.mozilla.org/show_bug.cgi?id=1195173
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">
15 <body onload=
"checkCSS()">
16 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1195173">Mozilla Bug
1195173</a>
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
27 SimpleTest.waitForExplicitFinish();
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");
37 ok(false,
"accessing test.css should be allowed");
41 // accessing file:///home/foo/bar.css should throw
42 var badCSS = document.styleSheets[
1].cssRules
43 ok(false,
"accessing bar.css should throw");
46 ok(true,
"accessing bar.css should throw");