editor/libeditor/html/tests/test_bug620906.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 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=620906
     5 -->
     6 <head>
     7   <title>Test for Bug 620906</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=620906">Mozilla Bug 620906</a>
    14 <p id="display"></p>
    15 <div id="content">
    16   <iframe src="data:text/html,
    17     <body contenteditable
    18           onmousedown='
    19             document.designMode=&quot;on&quot;;
    20             document.designMode=&quot;off&quot;;
    21           '
    22     >
    23       <div style='height: 1000px;'></div>
    24     </body>">
    25     </iframe>
    26 </div>
    27 <pre id="test">
    28 <script type="application/javascript">
    30 /** Test for Bug 620906 **/
    31 SimpleTest.waitForExplicitFinish();
    32 addLoadEvent(function() {
    33   var iframe = document.querySelector("iframe");
    34   is(iframe.contentWindow.scrollY, 0, "Sanity check");
    35   var rect = iframe.getBoundingClientRect();
    36   setTimeout(function() {
    37     var onscroll = function () {
    38       iframe.contentWindow.removeEventListener("scroll", onscroll, false);
    39       isnot(iframe.contentWindow.scrollY, 0, "The scrollbar should work");
    40       SimpleTest.finish();
    41     }
    42     iframe.contentWindow.addEventListener("scroll", onscroll, false);
    43     synthesizeMouse(iframe, rect.width - 5, rect.height / 2, {});
    44   }, 0);
    45 });
    47 </script>
    48 </pre>
    49 </body>
    50 </html>

mercurial