Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!doctype html> |
michael@0 | 2 | <!-- |
michael@0 | 3 | https://bugzilla.mozilla.org/show_bug.cgi?id=721136 |
michael@0 | 4 | --> |
michael@0 | 5 | <title>Test for Bug 721136</title> |
michael@0 | 6 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 7 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 8 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=721136">Mozilla Bug 721136</a> |
michael@0 | 9 | <pre id="test"> |
michael@0 | 10 | <script> |
michael@0 | 11 | [ |
michael@0 | 12 | [" mAtRiX(1, 2,3,4, 5,6 ) ", "matrix(1, 2, 3, 4, 5, 6)"], |
michael@0 | 13 | [" mAtRiX3d( 1,2,3,0,4 ,5,6,0,7,8 , 9,0,10, 11,12,1 ) ", |
michael@0 | 14 | "matrix3d(1, 2, 3, 0, 4, 5, 6, 0, 7, 8, 9, 0, 10, 11, 12, 1)"], |
michael@0 | 15 | [" pErSpEcTiVe( 400Px ) ", "perspective(400px)"], |
michael@0 | 16 | [" rOtAtE( 90dEg ) ", "rotate(90deg)"], |
michael@0 | 17 | [" rOtAtE3d( 0,0 , 1 ,180DeG ) ", "rotate3d(0, 0, 1, 180deg)"], |
michael@0 | 18 | [" rOtAtEx( 100GrAD ) ", "rotateX(100grad)"], |
michael@0 | 19 | [" rOtAtEy( 1.57RaD ) ", "rotateY(1.57rad)"], |
michael@0 | 20 | [" rOtAtEz( 0.25TuRn ) ", "rotateZ(0.25turn)"], |
michael@0 | 21 | [" sCaLe( 2 ) ", "scale(2)"], |
michael@0 | 22 | [" sCaLe( 2,3 ) ", "scale(2, 3)"], |
michael@0 | 23 | [" sCaLe3D( 2,4 , -9 ) ", "scale3d(2, 4, -9)"], |
michael@0 | 24 | [" sCaLeX( 2 ) ", "scaleX(2)"], |
michael@0 | 25 | [" sCaLeY( 2 ) ", "scaleY(2)"], |
michael@0 | 26 | [" sCaLeZ( 2 ) ", "scaleZ(2)"], |
michael@0 | 27 | [" sKeW( 45dEg ) ", "skew(45deg)"], |
michael@0 | 28 | [" sKeW( 45dEg,45DeG ) ", "skew(45deg, 45deg)"], |
michael@0 | 29 | [" sKeWx( 45DeG ) ", "skewX(45deg)"], |
michael@0 | 30 | [" sKeWy( 45DeG ) ", "skewY(45deg)"], |
michael@0 | 31 | [" tRaNsLaTe( 1Px ) ", "translate(1px)"], |
michael@0 | 32 | [" tRaNsLaTe( 1Px,3Pt ) ", "translate(1px, 3pt)"], |
michael@0 | 33 | [" tRaNsLaTe3D( 21pX,-6pX , 4pX ) ", "translate3d(21px, -6px, 4px)"], |
michael@0 | 34 | [" tRaNsLaTeX( 1pT ) ", "translateX(1pt)"], |
michael@0 | 35 | [" tRaNsLaTeY( 1iN ) ", "translateY(1in)"], |
michael@0 | 36 | [" tRaNsLaTeZ( 15.4pX ) ", "translateZ(15.4px)"], |
michael@0 | 37 | ["tranSlatex( 16px )rotatez(-90deg) rotate(100grad)\ttranslate3d(12pt, 0pc, 0.0em)", |
michael@0 | 38 | "translateX(16px) rotateZ(-90deg) rotate(100grad) translate3d(12pt, 0pc, 0em)"], |
michael@0 | 39 | ].forEach(function(arr) { |
michael@0 | 40 | document.documentElement.style.MozTransform = arr[0]; |
michael@0 | 41 | is(document.documentElement.style.MozTransform, arr[1], |
michael@0 | 42 | "incorrect serialization"); |
michael@0 | 43 | }); |
michael@0 | 44 | |
michael@0 | 45 | var elt = document.documentElement; |
michael@0 | 46 | |
michael@0 | 47 | elt.setAttribute("style", |
michael@0 | 48 | "transform: tRANslatEX(5px) TRanslATey(10px) translatez(2px) ROTATEX(30deg) rotateY(30deg) rotatez(5deg) SKEWx(10deg) skewy(10deg) scaleX(2) SCALEY(0.5) scalez(2)"); |
michael@0 | 49 | is(elt.style.getPropertyValue("transform"), |
michael@0 | 50 | "translateX(5px) translateY(10px) translateZ(2px) rotateX(30deg) rotateY(30deg) rotateZ(5deg) skewX(10deg) skewY(10deg) scaleX(2) scaleY(0.5) scaleZ(2)", |
michael@0 | 51 | "expected case canonicalization of transform functions"); |
michael@0 | 52 | |
michael@0 | 53 | if (SpecialPowers.getBoolPref("layout.css.font-features.enabled")) { |
michael@0 | 54 | elt.setAttribute("style", |
michael@0 | 55 | "font-variant-alternates: SWASH(fOo) stYLIStiC(Bar)"); |
michael@0 | 56 | is(elt.style.getPropertyValue("font-variant-alternates"), |
michael@0 | 57 | "swash(fOo) stylistic(Bar)", |
michael@0 | 58 | "expected case canonicalization of transform functions"); |
michael@0 | 59 | } |
michael@0 | 60 | |
michael@0 | 61 | elt.setAttribute("style", ""); // leave the page in a useful state |
michael@0 | 62 | |
michael@0 | 63 | </script> |
michael@0 | 64 | </pre> |