Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: LayoutTests/transforms/scale-parsing.html

Issue 1158603003: CSS Independent Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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"></di v>
5 <script src="resources/parsing-test-helper.js"></script>
6 <script>
7 expect = expect.bind(this, 'scale', 'scale');
8
9 expect('initial').parsesAs('initial').isComputedTo('1');
10 expect('inherit').parsesAs('inherit');
11
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');
15
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');
20
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>
OLDNEW
« no previous file with comments | « LayoutTests/transforms/scale-expected.html ('k') | LayoutTests/transforms/transform-properties-mixed.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698