content/html/document/test/bug199692-scrolled.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=199692
     5 -->
     6 <head>
     7   <title>Scrolled page for bug 199692 tests</title>
     8   <style type="text/css">
     9 /* Disable default margins/padding/borders so (0, 0) gets a div. */
    10 * { margin: 0; padding: 0; border: 0; }
    11   </style>
    12   <script type="application/javascript">
    13 function $(id) { return document.getElementById(id); }
    15 function runTests()
    16 {
    17   var is = window.parent.is;
    19   is(document.elementFromPoint(0, 0), $("down"),
    20      "document.elementFromPoint not respecting scrolling?");
    21   is(document.elementFromPoint(200, 200), null,
    22      "should have returned null for a not-visible point");
    23   is(document.elementFromPoint(3, -5), null,
    24      "should have returned null for a not-visible point");
    25 }
    26   </script>
    27 </head>
    28 <!-- This page is loaded in a 200px-square iframe scrolled to #down. -->
    29 <body>
    30 <div style="height: 150px; background: lightblue;">first</div>
    31 <div id="down" style="height: 250px; background: lightgreen;">second</div>
    32 </body>
    33 </html>

mercurial