| Index: LayoutTests/transforms/translate-parsing.html
|
| diff --git a/LayoutTests/transforms/translate-parsing.html b/LayoutTests/transforms/translate-parsing.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b5a909889d3f4b09ab50f7600071a46ddbd07444
|
| --- /dev/null
|
| +++ b/LayoutTests/transforms/translate-parsing.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<div id="target" style="width: 100px; height: 200px; display: inline-block"></div>
|
| +<script src="resources/parsing-test-helper.js"></script>
|
| +<script>
|
| +expect = expect.bind(this, 'translate', 'translate');
|
| +
|
| +expect('initial').parsesAs('initial').isComputedTo('0px');
|
| +expect('inherit').parsesAs('inherit');
|
| +
|
| +expect('10px').parsesAs('10px').isComputedTo('10px');
|
| +expect('10px -2.5px').parsesAs('10px -2.5px').isComputedTo('10px -2.5px');
|
| +expect('10px -2.5px 0').parsesAs('10px -2.5px 0px').isComputedTo('10px -2.5px 0px');
|
| +
|
| +expect('42.5%').parsesAs('42.5%').isComputedTo('42.5px');
|
| +expect('42.5% -20.5%').parsesAs('42.5% -20.5%').isComputedTo('42.5px -41px');
|
| +expect('42.5% -20.5% 5px').parsesAs('42.5% -20.5% 5px').isComputedTo('42.5px -41px 5px');
|
| +
|
| +expect('10px -2%').parsesAs('10px -2%').isComputedTo('10px -4px');
|
| +expect('10% -2px').parsesAs('10% -2px').isComputedTo('10px -2px');
|
| +expect('10% -2px 4px').parsesAs('10% -2px 4px').isComputedTo('10px -2px 4px');
|
| +
|
| +expect('2').isInvalid();
|
| +expect('none').isInvalid();
|
| +expect('10deg 10px').isInvalid();
|
| +expect('10px 10px 10%').isInvalid();
|
| +expect('20smigens').isInvalid();
|
| +expect('10px 20px 5 6').isInvalid();
|
| +expect('10% 20% 30%').isInvalid();
|
| +</script>
|
|
|