layout/style/test/test_bug874919.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.

michael@0 1 <!DOCTYPE HTML>
michael@0 2 <html>
michael@0 3 <!--
michael@0 4 https://bugzilla.mozilla.org/show_bug.cgi?id=874919
michael@0 5 -->
michael@0 6 <head>
michael@0 7 <title>Test for Bug 874919</title>
michael@0 8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
michael@0 9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
michael@0 11 </head>
michael@0 12 <body>
michael@0 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=874919">Mozilla Bug 874919</a>
michael@0 14 <p id="display"></p>
michael@0 15 <div id="content" style="width: 150px">
michael@0 16 <svg id="outer_SVG" style="display: inline; width: 100%">
michael@0 17 <circle cx="120" cy="120" r="120" fill="blue"></circle>
michael@0 18 <svg id="inner_SVG">
michael@0 19 <circle id="circle" cx="120" cy="120" r="120" fill="red"></circle>
michael@0 20 </svg>
michael@0 21 </svg>
michael@0 22 </div>
michael@0 23 <pre id="test">
michael@0 24
michael@0 25 <script type="text/javascript">
michael@0 26
michael@0 27 var shouldUseComputed = ["inner_SVG"]
michael@0 28 var shouldUseUsed = ["outer_SVG"]
michael@0 29
michael@0 30 shouldUseUsed.forEach(function(elemId) {
michael@0 31
michael@0 32 var style = window.getComputedStyle(document.getElementById(elemId));
michael@0 33
michael@0 34 ok(style.width.match(/^\d+px$/),
michael@0 35 "Inline Outer SVG element's getComputedStyle.width should be used value. ");
michael@0 36
michael@0 37 ok(style.height.match(/^\d+px$/),
michael@0 38 "Inline Outer SVG element's getComputedStyle.height should be used value.");
michael@0 39 });
michael@0 40
michael@0 41 shouldUseComputed.forEach(function(elemId) {
michael@0 42 var style = window.getComputedStyle(document.getElementById(elemId));
michael@0 43
michael@0 44 // Computed value should match either the percentage used, or "auto" in the case of the inner SVG element.
michael@0 45 ok(style.width.match(/^\d+%$|^auto$/),
michael@0 46 "Inline inner SVG element's getComputedStyle.width should be computed value. " + style.width);
michael@0 47
michael@0 48 ok(style.height.match(/^\d+%$|^auto$/),
michael@0 49 "Inline inner SVG element's getComputedStyle.height should be computed value. " + style.height);
michael@0 50 });
michael@0 51
michael@0 52 </script>
michael@0 53 </pre>
michael@0 54 </body>
michael@0 55 </html>

mercurial