editor/composer/test/test_bug389350.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 <html>
     2 <!--
     3 https://bugzilla.mozilla.org/show_bug.cgi?id=389350
     4 -->
     5 <head>
     6 <title>Test for Bug 389350</title>
     7 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     8 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    11 <script type="text/javascript">
    13 function runTest() {
    14   var e = document.getElementById("edit");
    15   e.contentDocument.designMode='on';
    16   e.style.display='block';
    17   e.focus();
    18   sendString('abc');
    19   var expected = "<head></head><body>abc</body>";
    20   var result = e.contentDocument.documentElement.innerHTML;
    21   is(result, expected, "iframe with designmode on had incorrect content");
    22   SimpleTest.finish();
    23 }
    25 SimpleTest.waitForExplicitFinish();
    26 addLoadEvent(runTest);
    27 </script>
    29 </head>
    30 <body id="body">
    31 <iframe id="edit" width="200" height="100" style="display: none;" src="">
    32 </body>
    33 </html>

mercurial