content/base/test/test_bug455629.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=455629
     5 -->
     6 <head>
     7   <title>Test for Bug 455629</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=455629">Mozilla Bug 455629</a>
    13 <p id="display"></p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script type="application/javascript">
    19 /** Test for Bug 455629 **/
    20 SimpleTest.waitForExplicitFinish();
    22 var done = 0;
    23 function doTest(name) {
    24     var elem = $(name);
    25     var doc = elem.getSVGDocument();
    26     try {
    27         doc.foopy = 42;
    28         fail("Able to set cross origin property!");
    29     } catch (e) {
    30         ok(true, "unable to set non-allAccess property cross origin");
    31     }
    33     if (elem instanceof HTMLObjectElement) {
    34         doc = elem.contentDocument;
    35         try {
    36             doc.foopy = 42;
    37             fail("Able to set cross origin property!");
    38         } catch (e) {
    39             ok(true, "unable to set non-allAccess property cross origin");
    40         }
    41     }
    43     if (++done == 2) {
    44         SimpleTest.finish();
    45     }
    46 }
    47 </script>
    49 <object id="obj"
    50         type="image/svg+xml"
    51         onload="doTest('obj')"
    52         data="http://example.org/tests/content/base/test/bug455629-helper.svg">
    53 </object>
    55 <embed id="emb"
    56        type="image/svg+xml"
    57        onload="doTest('emb')"
    58        src="http://example.org/tests/content/base/test/bug455629-helper.svg">
    59 </embed>
    61 </pre>
    62 </body>
    63 </html>

mercurial