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

Unified Diff: LayoutTests/fast/css3-text/css3-text-decoration/stable/getComputedStyle-text-decoration.html

Issue 282303007: Don't pretend that text-decoration is a shorthand in computed style. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test for stable/experimental. Created 6 years, 7 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/fast/css3-text/css3-text-decoration/stable/getComputedStyle-text-decoration-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css3-text/css3-text-decoration/stable/getComputedStyle-text-decoration.html
diff --git a/LayoutTests/fast/css3-text/css3-text-decoration/stable/getComputedStyle-text-decoration.html b/LayoutTests/fast/css3-text/css3-text-decoration/stable/getComputedStyle-text-decoration.html
new file mode 100644
index 0000000000000000000000000000000000000000..8bbb9d7513a169c56a88f8251b1190bd07b21698
--- /dev/null
+++ b/LayoutTests/fast/css3-text/css3-text-decoration/stable/getComputedStyle-text-decoration.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<p>Test that computed style for text-decoration is correctly represented.</p>
+<div id="target" style="text-decoration: underline;">This text should be underlined.</div>
+<pre id="result"></pre>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function testDecoration(elm) {
+ var decoration = getComputedStyle(elm).textDecoration;
+
+ // Checking the start of the result string is the best we can do here,
+ // because we expect different results depending on whether experimental
+ // features are enabled or not.
+ //
+ // The important thing is that the computed value for text-decoration
+ // ends up in the text output somehow.
+ var expectedStart = "underline";
+ if (decoration.substr(0, expectedStart.length) != expectedStart)
+ throw "Incorrect computed style: " + decoration + ". " +
+ "Expected something that starts with: " + expectedStart;
+
+ return decoration;
+ }
+
+ try {
+ result.innerText = "PASS: " + testDecoration(target);
+ } catch (e) {
+ result.innerText = "FAIL: " + e;
+ }
+</script>
rune 2014/05/16 22:20:09 If you use js-test.js, you could do something like
andersr 2014/05/19 08:10:18 Ah, wasn't aware that it existed. Done!
« no previous file with comments | « no previous file | LayoutTests/fast/css3-text/css3-text-decoration/stable/getComputedStyle-text-decoration-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698