dom/events/test/test_dblclick_explicit_original_target.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 <head>
     4   <title>Test explicit original target of dblclick event</title>
     5   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     7   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     8 </head>
     9 <body>
    10 <p id="display">Test explicit original target of dblclick event</p>
    11 <div id="content" style="display: none">
    13 </div>
    14 <pre id="test">
    15 <script type="application/javascript">
    17 SimpleTest.waitForExplicitFinish();
    18 SimpleTest.waitForFocus(runTests);
    20 function runTests()
    21 {
    22   synthesizeMouse(document.getElementById("display"), 5, 5, { clickCount: 2 });
    23 }
    25 window.ondblclick = function(event) {
    26   is(event.explicitOriginalTarget.nodeType, Node.TEXT_NODE, "explicitOriginalTarget is a text node");
    27   SimpleTest.finish();
    28 }
    30 </script>
    31 </pre>
    32 </body>
    33 </html>

mercurial