layout/style/test/test_bug716226.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=716226
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 716226</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <style id="s">
    12     @keyframes foo { }
    13   </style>
    14 </head>
    15 <body>
    16 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=716226">Mozilla Bug 716226</a>
    17 <p id="display"></p>
    18 <div id="content" style="display: none">
    20 </div>
    21 <pre id="test">
    22 <script type="application/javascript">
    24 /** Test for Bug 716226 **/
    25 var sheet = $("s").sheet;
    26 var rules = sheet.cssRules;
    27 is(rules.length, 1, "Should have one keyframes rule");
    28 var keyframesRule = rules[0];
    29 var keyframeRules = keyframesRule.cssRules;
    30 is(keyframeRules.length, 0, "Should have no keyframe rules yet");
    32 keyframesRule.appendRule('0% { }');
    33 is(keyframeRules.length, 1, "Should have a keyframe rule now");
    34 var keyframeRule = keyframeRules[0];
    35 is(keyframeRule.parentRule, keyframesRule,
    36    "Parent of keyframe should be keyframes");
    37 is(keyframeRule.parentStyleSheet, sheet,
    38    "Parent stylesheet of keyframe should be our sheet");
    40 is(keyframeRule.style.cssText, "", "Should have no declarations yet");
    41 // Note: purposefully non-canonical cssText string so we can make sure we
    42 // really invoked the CSS parser and serializer.
    43 keyframeRule.style.cssText = "color:green";
    44 is(keyframeRule.style.cssText, "color: green;",
    45    "Should have the declarations we set now");
    49 </script>
    50 </pre>
    51 </body>
    52 </html>

mercurial