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

Unified Diff: LayoutTests/transforms/perspective-origin-parsing.html

Issue 98663004: Add support for unprefixed CSS Transforms (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/transforms/perspective-parsing.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/transforms/perspective-origin-parsing.html
diff --git a/LayoutTests/transforms/perspective-origin-parsing.html b/LayoutTests/transforms/perspective-origin-parsing.html
new file mode 100644
index 0000000000000000000000000000000000000000..8eb82d108da1906f8742e6d7fd45c78a3c747dda
--- /dev/null
+++ b/LayoutTests/transforms/perspective-origin-parsing.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id="target" style="width: 200px; height: 100px; display: inline-block"></div>
+<script src="resources/parsing-test-helper.js"></script>
+<script>
+expect = expect.bind(this, 'perspective-origin', 'perspectiveOrigin');
+
+expect('initial').parsesAs('initial').isComputedTo('100px 50px');
+expect('inherit').parsesAs('inherit');
+
+expect('left').parsesAs('left 50%').isComputedTo('0px 50px');
+expect('center').parsesAs('center 50%').isComputedTo('100px 50px');
+expect('right').parsesAs('right 50%').isComputedTo('200px 50px');
+expect('top').parsesAs('50% top');
+expect('bottom').parsesAs('50% bottom');
+expect('0').parsesAs('0px 50%');
+expect('10%').parsesAs('10% 50%').isComputedTo('20px 50px');
+expect('10px').parsesAs('10px 50%').isComputedTo('10px 50px');
+
+expect('left top').parsesAs('left top');
+expect('right bottom').parsesAs('right bottom');
+expect('center center').parsesAs('center center').isComputedTo('100px 50px');
+expect('center top').parsesAs('center top');
+expect('center left').parsesAs('left center');
+expect('top right').parsesAs('right top');
+expect('left 10%').parsesAs('left 10%');
+expect('left 10px').parsesAs('left 10px');
+expect('10% top').parsesAs('10% top');
+expect('10px top').parsesAs('10px top');
+expect('10px 20%').parsesAs('10px 20%');
+expect('0 0').parsesAs('0px 0px');
+expect('0px 10%').parsesAs('0px 10%').isComputedTo('0px 10px');
+expect('0px 20px').parsesAs('0px 20px').isComputedTo('0px 20px');
+expect('0px top').parsesAs('0px top').isComputedTo('0px 0px');
+expect('0px bottom').parsesAs('0px bottom').isComputedTo('0px 100px');
+expect('0px center').parsesAs('0px center').isComputedTo('0px 50px');
+
+expect('left right').isInvalid();
+expect('top bottom').isInvalid();
+expect('none').isInvalid();
+expect('20').isInvalid();
+expect('10% 20% 30%').isInvalid();
+expect('top 10%').isInvalid();
+expect('bottom 10%').isInvalid();
+expect('50% 50% 0px').isInvalid();
+</script>
« no previous file with comments | « no previous file | LayoutTests/transforms/perspective-parsing.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698