Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transforms / scale-parsing.html
blob7aa23fe6e157795cc5fff4bb21c66aa2246feb77
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <div id="target" style="width: 100px; height: 200px; display: inline-block"></div>
5 <script src="resources/parsing-test-helper.js"></script>
6 <script>
7 expect = expect.bind(this, 'scale', 'scale');
9 expect('initial').parsesAs('initial').isComputedTo('1');
10 expect('inherit').parsesAs('inherit');
12 expect('1').parsesAs('1').isComputedTo('1');
13 expect('1 -2.3').parsesAs('1 -2.3').isComputedTo('1 -2.3');
14 expect('1 -2.3 4').parsesAs('1 -2.3 4').isComputedTo('1 -2.3 4');
16 /* Note this assumes that scaling with 1 number applies to both x and y axis */
17 expect('calc(1 * 2)').parsesAs('2').isComputedTo('2 2');
18 expect('calc(1 * 2) calc(2 / 4)').parsesAs('2 0.5').isComputedTo('2 0.5');
19 expect('calc(1 * 2) calc(2 / 4) calc(0.5)').parsesAs('2 0.5 0.5').isComputedTo('2 0.5 0.5');
21 expect('2px').isInvalid();
22 expect('30%').isInvalid();
23 expect('1 1 1 1').isInvalid();
24 expect('1 2 3deg').isInvalid();
25 expect('1 + 1').isInvalid();
26 expect('1,').isInvalid();
27 expect('1, 2,').isInvalid();
28 expect('calc(1 * 2 + 4px) calc(2 / 4) calc(0.5)').isInvalid();
29 expect('calc(1 * 2) calc(2 / 4 * 4deg) calc(0.5)').isInvalid();
30 expect('calc(1 * 2) calc(2 / 4) calc(0.5%)').isInvalid();
31 </script>