editor/libeditor/html/tests/test_bug372345.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=372345
     5 -->
     6 <head>
     7   <title>Test for Bug 372345</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=372345">Mozilla Bug 372345</a>
    14 <p id="display"></p>
    15 <div id="content">
    16   <iframe src="data:text/html,<body>"></iframe>
    17 </div>
    18 <pre id="test">
    19 <script type="application/javascript">
    21 /** Test for Bug 372345 **/
    22 SimpleTest.waitForExplicitFinish();
    23 addLoadEvent(function() {
    24   var iframe = document.querySelector("iframe");
    25   var doc = iframe.contentDocument;
    26   var content = doc.body;
    27   var link = content.querySelector("a");
    28   function testCursor(post) {
    29     setTimeout(function() {
    30       var link = document.createElement("a");
    31       link.href = "http://mozilla.org/";
    32       link.textContent = "link";
    33       link.style.cursor = "pointer";
    34       content.appendChild(link);
    35       is(iframe.contentWindow.getComputedStyle(link, null).cursor, "pointer", "Make sure that the cursor is set to pointer");
    36       setTimeout(post, 0);
    37     }, 0);
    38   }
    39   testCursor(function() {
    40     doc.designMode = "on";
    41     testCursor(function() {
    42       doc.designMode = "off";
    43       testCursor(function() {
    44         content.setAttribute("contenteditable", "true");
    45         testCursor(function() {
    46           content.removeAttribute("contenteditable");
    47           testCursor(function() {
    48             SimpleTest.finish();
    49           });
    50         });
    51       });
    52     });
    53   });
    54 });
    56 </script>
    57 </pre>
    58 </body>
    59 </html>

mercurial