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!
|