layout/style/test/test_bug391221.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=391221
     5 -->
     6 <head>
     7   <title>Test for Bug 391221</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    10 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=391221">Mozilla Bug 391221</a>
    13 <p id="display">
    14   <div id="width-ref" style="width: 2ch"></div>
    15 </p>
    16 <div id="content" style="display: none">
    18 <div id="one" style="width: 1000px; max-width: 2ch"></div>
    19 <div id="two" style="width: 0px; min-width: 2ch"></div>
    20 <div id="three" style="width: 1000ch; max-width: 2px"></div>
    22 </div>
    23 <pre id="test">
    24 <script class="testbody" type="text/javascript">
    26 /** Test for Bug 391221 **/
    27 function getComp(id) {
    28  return document.defaultView.getComputedStyle($(id), "");
    29 }
    31 is(getComp("one").width, getComp("width-ref").width,
    32    "max-width in ch units not working?");
    34 is(getComp("two").width, getComp("width-ref").width,
    35    "min-width in ch units not working?");
    37 is(getComp("three").width, "2px", "max-width not applied to width in chars?");
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial