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

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

Issue 1158603003: CSS Independent Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Correct equality operators and remove dependencies on size() in parser 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, 'translate', 'translate');
8
9 expect('initial').parsesAs('initial').isComputedTo('0px');
10 expect('inherit').parsesAs('inherit');
11
12 expect('10px').parsesAs('10px').isComputedTo('10px');
13 expect('10px -2.5px').parsesAs('10px -2.5px').isComputedTo('10px -2.5px');
14 expect('10px -2.5px 0').parsesAs('10px -2.5px 0px').isComputedTo('10px -2.5px 0p x');
15
16 expect('42.5%').parsesAs('42.5%').isComputedTo('42.5px');
17 expect('42.5% -20.5%').parsesAs('42.5% -20.5%').isComputedTo('42.5px -41px');
18 expect('42.5% -20.5% 5px').parsesAs('42.5% -20.5% 5px').isComputedTo('42.5px -41 px 5px');
19
20 expect('10px -2%').parsesAs('10px -2%').isComputedTo('10px -4px');
21 expect('10% -2px').parsesAs('10% -2px').isComputedTo('10px -2px');
22 expect('10% -2px 4px').parsesAs('10% -2px 4px').isComputedTo('10px -2px 4px');
23
24 expect('2').isInvalid();
25 expect('none').isInvalid();
26 expect('10deg 10px').isInvalid();
27 expect('10px 10px 10%').isInvalid();
28 expect('20smigens').isInvalid();
29 expect('10px 20px 5 6').isInvalid();
30 expect('10% 20% 30%').isInvalid();
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698