dom/plugins/test/mochitest/test_pluginstream_src_referer.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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