dom/plugins/test/mochitest/test_pluginstream_src_referer.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <head>
     2   <title>Do plugin stream src requests send the Referer header correctly?</title>
     3   <script type="application/javascript"
     4 	  src="/tests/SimpleTest/SimpleTest.js"></script>
     5   <script type="text/javascript" src="utils.js"></script>
     6   <link rel="stylesheet" type="text/css" 
     7         href="/tests/SimpleTest/test.css" />
     9 <body>
    10   <p id="display"></p>
    12   <script class="testbody" type="application/javascript">
    13   SimpleTest.waitForExplicitFinish();
    14   setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    16   function frameLoaded() {
    17     var testframe = document.getElementById('pluginframe');
    18     var content = testframe.contentDocument.body.innerHTML;
    19     if (!content.length)
    20       return;
    22     is(content, "Referer found: " + window.location);
    23     SimpleTest.finish();
    24   }
    25   </script>
    27   <iframe name="pluginframe" id="pluginframe" onload="frameLoaded()"></iframe>
    29   <embed id="plugin" type="application/x-test" src="plugin-stream-referer.sjs" width="200" height="200" frame="pluginframe"></embed>

mercurial