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

Unified Diff: third_party/WebKit/LayoutTests/css3/calc/word-spacing.html

Issue 1348363004: Add consumeInteger/consumeLength (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 3 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/calc/word-spacing.html
diff --git a/third_party/WebKit/LayoutTests/css3/calc/word-spacing.html b/third_party/WebKit/LayoutTests/css3/calc/word-spacing.html
new file mode 100644
index 0000000000000000000000000000000000000000..18ab370e65baf7a5e31ddb2c81e4a1a130b2a644
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/css3/calc/word-spacing.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<style>
+.invalid {
+ word-spacing: 20px;
+ word-spacing: calc(1 + 1px);
+ word-spacing: calc(1 + 100%);
+ word-spacing: calc(100%);
+ word-spacing: calc(10px) bla;
+ word-spacing: calc(bla) 10px;
+}
+.valid {
+ word-spacing: calc(10px);
+}
+</style>
+<div class="invalid"></div>
+<div class="valid"></div>
+<script src="../../resources/js-test.js"></script>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function getComputedValue(selector, property) {
+ return getComputedStyle(document.querySelector(selector))[property];
+}
+
+shouldBe('getComputedValue(".invalid", "wordSpacing")', '"20px"');
+shouldBe('getComputedValue(".valid", "wordSpacing")', '"10px"');
+</script>

Powered by Google App Engine
This is Rietveld 408576698