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

Unified Diff: third_party/WebKit/LayoutTests/css3/calc/letter-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/letter-spacing.html
diff --git a/third_party/WebKit/LayoutTests/css3/calc/letter-spacing.html b/third_party/WebKit/LayoutTests/css3/calc/letter-spacing.html
new file mode 100644
index 0000000000000000000000000000000000000000..ccbd996d353a1e10df1f78a8c5a5e87e53d3f3e0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/css3/calc/letter-spacing.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<style>
+.invalid {
+ letter-spacing: 20px;
+ letter-spacing: calc(1 + 1px);
+ letter-spacing: calc(1 + 100%);
+ letter-spacing: calc(100%);
+ letter-spacing: calc(10px) bla;
+ letter-spacing: calc(bla) 10px;
+}
+.valid {
+ letter-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", "letterSpacing")', '"20px"');
+shouldBe('getComputedValue(".valid", "letterSpacing")', '"10px"');
+</script>

Powered by Google App Engine
This is Rietveld 408576698