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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <p>Test that computed style for text-decoration is correctly represented.</p>
3 <div id="target" style="text-decoration: underline;">This text should be underli ned.</div>
4 <pre id="result"></pre>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
8
9 function testDecoration(elm) {
10 var decoration = getComputedStyle(elm).textDecoration;
11
12 // Checking the start of the result string is the best we can do here,
13 // because we expect different results depending on whether experimental
14 // features are enabled or not.
15 //
16 // The important thing is that the computed value for text-decoration
17 // ends up in the text output somehow.
18 var expectedStart = "underline";
19 if (decoration.substr(0, expectedStart.length) != expectedStart)
20 throw "Incorrect computed style: " + decoration + ". " +
21 "Expected something that starts with: " + expectedStart;
22
23 return decoration;
24 }
25
26 try {
27 result.innerText = "PASS: " + testDecoration(target);
28 } catch (e) {
29 result.innerText = "FAIL: " + e;
30 }
31 </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!
OLDNEW
« 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