Sat, 03 Jan 2015 20:18:00 +0100
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 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title>Test for Animation Behavior on CSS Properties</title> |
michael@0 | 4 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 5 | <script type="text/javascript" src="smilTestUtils.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 7 | </head> |
michael@0 | 8 | <body> |
michael@0 | 9 | <p id="display"></p> |
michael@0 | 10 | <div id="content" style="display: none"> |
michael@0 | 11 | <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="300px" height="200px" |
michael@0 | 12 | onload="this.pauseAnimations()"> |
michael@0 | 13 | <!-- At 50% through the animation, the following should be true: |
michael@0 | 14 | * First <g> has font-size = 5px (1/2 between 0px and 10px) |
michael@0 | 15 | * Next <g> has font-size = 10px (1/2 between inherit=5px and 15px) |
michael@0 | 16 | * Next <g> has font-size = 15px (1/2 between inherit=10px and 20px) |
michael@0 | 17 | * Next <g> has font-size = 20px (1/2 between inherit=15px and 25px) |
michael@0 | 18 | * Next <g> has font-size = 25px (1/2 between inherit=20px and 30px) |
michael@0 | 19 | * Next <g> has font-size = 30px (1/2 between inherit=25px and 35px) |
michael@0 | 20 | * Next <g> has font-size = 35px (1/2 between inherit=30px and 40px) |
michael@0 | 21 | * Next <g> has font-size = 40px (1/2 between inherit=35px and 45px) |
michael@0 | 22 | * Next <g> has font-size = 45px (1/2 between inherit=40px and 50px) |
michael@0 | 23 | * Next <g> has font-size = 50px (1/2 between inherit=45px and 55px) |
michael@0 | 24 | * <text> has font-size = 75px (1/2 between inherit=50px and 100px) |
michael@0 | 25 | --> |
michael@0 | 26 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 27 | from="0px" to="10px" begin="0s" dur="1s"/> |
michael@0 | 28 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 29 | from="inherit" to="15px" begin="0s" dur="1s"/> |
michael@0 | 30 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 31 | from="inherit" to="20px" begin="0s" dur="1s"/> |
michael@0 | 32 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 33 | from="inherit" to="25px" begin="0s" dur="1s"/> |
michael@0 | 34 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 35 | from="inherit" to="30px" begin="0s" dur="1s"/> |
michael@0 | 36 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 37 | from="inherit" to="35px" begin="0s" dur="1s"/> |
michael@0 | 38 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 39 | from="inherit" to="40px" begin="0s" dur="1s"/> |
michael@0 | 40 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 41 | from="inherit" to="45px" begin="0s" dur="1s"/> |
michael@0 | 42 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 43 | from="inherit" to="50px" begin="0s" dur="1s"/> |
michael@0 | 44 | <g><animate attributeName="font-size" attributeType="CSS" |
michael@0 | 45 | from="inherit" to="55px" begin="0s" dur="1s"/> |
michael@0 | 46 | <text y="100px" x="0px"> |
michael@0 | 47 | abc |
michael@0 | 48 | <animate attributeName="font-size" attributeType="CSS" |
michael@0 | 49 | from="inherit" to="100px" begin="0s" dur="1s"/> |
michael@0 | 50 | </text></g></g></g></g></g></g></g></g></g></g> |
michael@0 | 51 | </svg> |
michael@0 | 52 | </div> |
michael@0 | 53 | <pre id="test"> |
michael@0 | 54 | <script class="testbody" type="text/javascript"> |
michael@0 | 55 | <![CDATA[ |
michael@0 | 56 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 57 | |
michael@0 | 58 | function main() { |
michael@0 | 59 | // Pause & seek to halfway through animation |
michael@0 | 60 | var svg = SMILUtil.getSVGRoot(); |
michael@0 | 61 | ok(svg.animationsPaused(), "should be paused by <svg> load handler"); |
michael@0 | 62 | is(svg.getCurrentTime(), 0, "should be paused at 0 in <svg> load handler"); |
michael@0 | 63 | svg.setCurrentTime(0.5); |
michael@0 | 64 | |
michael@0 | 65 | var text = document.getElementsByTagName("text")[0]; |
michael@0 | 66 | var computedVal = SMILUtil.getComputedStyleSimple(text, "font-size"); |
michael@0 | 67 | var expectedVal = "75px"; |
michael@0 | 68 | |
michael@0 | 69 | // NOTE: There's a very small chance (1/11! = 1/39,916,800) that we'll happen |
michael@0 | 70 | // to composite our 11 animations in the correct order, in which cast this |
michael@0 | 71 | // "todo_is" test would sporadically pass. I think this is infrequent enough |
michael@0 | 72 | // to accept as a sporadic pass rate until this bug is fixed (at which point |
michael@0 | 73 | // this "todo_is" will become an "is") |
michael@0 | 74 | todo_is(computedVal, expectedVal, |
michael@0 | 75 | "deeply-inherited font-size halfway through animation"); |
michael@0 | 76 | |
michael@0 | 77 | SimpleTest.finish(); |
michael@0 | 78 | } |
michael@0 | 79 | |
michael@0 | 80 | window.addEventListener("load", main, false); |
michael@0 | 81 | ]]> |
michael@0 | 82 | </script> |
michael@0 | 83 | </pre> |
michael@0 | 84 | </body> |
michael@0 | 85 | </html> |