Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transforms / transform-origin-parsing.html
blob39018d2ec4fc57c8b2fdb7f840011bcc343bbe49
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <div id="target" style="width: 200px; height: 100px; display: inline-block"></div>
5 <script src="resources/parsing-test-helper.js"></script>
6 <script>
7 expect = expect.bind(this, 'transform-origin', 'transformOrigin');
9 expect('initial').parsesAs('initial').isComputedTo('100px 50px');
10 expect('inherit').parsesAs('inherit');
12 expect('left').parsesAs('left 50% 0px').isComputedTo('0px 50px');
13 expect('center').parsesAs('center 50% 0px').isComputedTo('100px 50px');
14 expect('right').parsesAs('right 50% 0px').isComputedTo('200px 50px');
15 expect('top').parsesAs('50% top 0px');
16 expect('bottom').parsesAs('50% bottom 0px');
17 expect('0').parsesAs('0px 50% 0px');
18 expect('10%').parsesAs('10% 50% 0px').isComputedTo('20px 50px');
19 expect('10px').parsesAs('10px 50% 0px').isComputedTo('10px 50px');
21 expect('left top').parsesAs('left top 0px');
22 expect('right bottom').parsesAs('right bottom 0px');
23 expect('center center').parsesAs('center center 0px').isComputedTo('100px 50px');
24 expect('center top').parsesAs('center top 0px');
25 expect('center left').parsesAs('left center 0px');
26 expect('top right').parsesAs('right top 0px');
27 expect('left 10%').parsesAs('left 10% 0px');
28 expect('left 10px').parsesAs('left 10px 0px');
29 expect('10% top').parsesAs('10% top 0px');
30 expect('10px top').parsesAs('10px top 0px');
31 expect('10px 20%').parsesAs('10px 20% 0px');
32 expect('0 0').parsesAs('0px 0px 0px');
33 expect('0px 10%').parsesAs('0px 10% 0px').isComputedTo('0px 10px');
34 expect('0px 20px').parsesAs('0px 20px 0px').isComputedTo('0px 20px');
35 expect('0px top').parsesAs('0px top 0px').isComputedTo('0px 0px');
36 expect('0px bottom').parsesAs('0px bottom 0px').isComputedTo('0px 100px');
37 expect('0px center').parsesAs('0px center 0px').isComputedTo('0px 50px');
39 expect('0 0 0').parsesAs('0px 0px 0px');
40 expect('10% 20% 30px').parsesAs('10% 20% 30px');
41 expect('left top 10px').parsesAs('left top 10px');
42 expect('center center 20px').parsesAs('center center 20px');
43 expect('0px 0px 5px').parsesAs('0px 0px 5px').isComputedTo('0px 0px 5px');
45 expect('left right').isInvalid();
46 expect('top bottom').isInvalid();
47 expect('none').isInvalid();
48 expect('20').isInvalid();
49 expect('10% 20% 30%').isInvalid();
50 expect('top 10%').isInvalid();
51 expect('bottom 10%').isInvalid();
52 expect('50% 50% 0px 0px').isInvalid();
53 </script>