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

Unified Diff: third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-quirklength.html

Issue 2577363002: Implement CSS Logical Properties: inline/block size (Closed)
Patch Set: Refactor test case Created 3 years, 11 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
Index: third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-quirklength.html
diff --git a/third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-quirklength.html b/third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-quirklength.html
new file mode 100644
index 0000000000000000000000000000000000000000..98e9011f049881b324ad05b68e745730944574a0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-quirklength.html
@@ -0,0 +1,30 @@
+<meta charset="utf-8">
+<title>CSS Logical Properties: {max-,min-}block-size</title>
+<link rel="author" title="Xu Xing" href="mailto:openxu@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-logical-props-1/#logical-dimension-properties">
+<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#logical-to-physical">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<style> #dummy {} </style>
+
+<script>
+function isValidDeclaration(cssText) {
+ var cssRule = document.styleSheets[0].cssRules[0];
+ cssRule.style = cssText;
+ var valid = (cssRule.style.length > 0);
+ cssRule.style = "";
+ return valid;
+}
+var tests = [
+ {cssText:"block-size: 1"},
+ {cssText:"min-block-size: 1"},
+ {cssText:"max-block-size: 1"},
+ {cssText:"inline-size: 1"},
+ {cssText:"min-inline-size: 1"},
+ {cssText:"max-inline-size: 1"},
+];
+tests.forEach(function(t) {
+ test(() => assert_false(isValidDeclaration(t.cssText)), "Check that unitless lengths are not valid for logical properties in quirks mode");
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698