editor/libeditor/html/tests/test_bug725069.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=725069
     5 -->
     6 <head>
     7   <title>Test for Bug 725069</title>
     8   <script type="application/javascript" src="/MochiKit/packed.js"></script>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    11   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    12 </head>
    13 <body contenteditable>abc<!-- XXX -->def<span></span>
    14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=725069">Mozilla Bug 725069</a>
    15 <p id="display"></p>
    16 <pre id="test">
    17 <script type="application/javascript">
    19 /** Test for Bug 725069 **/
    20 SimpleTest.waitForExplicitFinish();
    21 addLoadEvent(function() {
    22   var body = document.querySelector("body");
    23   is(body.firstChild.nodeType, body.TEXT_NODE, "The first node is a text node");
    24   is(body.firstChild.nodeValue, "abc", "The first text node is there");
    25   is(body.firstChild.nextSibling.nodeType, body.COMMENT_NODE, "The second node is a comment node");
    26   is(body.firstChild.nextSibling.nodeValue, " XXX ", "The value of the comment node is not changed");
    27   is(body.firstChild.nextSibling.nextSibling.nodeType, body.TEXT_NODE, "The last text node is a text node");
    28   is(body.firstChild.nextSibling.nextSibling.nodeValue, "def", "The last next node is there");
    29   SimpleTest.finish();
    30 });
    32 </script>
    33 </pre>
    34 </body>
    35 </html>

mercurial