dom/plugins/test/mochitest/test_fullpage.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>Full-page seekable stream</title>
     4   <script type="text/javascript"
     5           src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <script type="application/javascript" src="utils.js"></script>
     7   <link rel="stylesheet" type="text/css"
     8         href="/tests/SimpleTest/test.css">
    10 <body>
    11   <p id="display"></p>
    13   <script type="application/javascript">
    14     SimpleTest.waitForExplicitFinish();
    15     setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    17     function frameLoaded() {
    18       var testframe = document.getElementById('testframe');
    19       var content = testframe.contentDocument.body.innerHTML;
    20       if (!content.length)
    21         return;
    23       var req = new XMLHttpRequest();
    24       req.open('GET', 'loremipsum.xtest', false);
    25       req.overrideMimeType('text/plain; charset=x-user-defined');
    26       req.send(null);
    27       is(req.status, 200, "bad XMLHttpRequest");
    28       is(content, req.responseText.replace(/\r\n/g, "\n"),
    29          "content doesn't match");
    30       SimpleTest.finish();
    31     }
    32   </script>
    34   <iframe src="loremipsum.xtest" streamtype="seek"></iframe>
    35   <iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>

mercurial