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

Unified Diff: LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-style.js

Issue 14576017: Implement CSS3TextDecorations runtime flag in favor of CSS3_TEXT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed updated on text-underline-position for now (to be discussed & re-added later) Created 7 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
Index: LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-style.js
diff --git a/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-style.js b/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-style.js
index e7df62938ab930ee5a4e828e701c2cb94ba5183c..72333340219e7c5290ace82403c12e720c19a46d 100644
--- a/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-style.js
+++ b/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-style.js
@@ -1,37 +1,37 @@
function testElementStyle(type, value)
{
if (type != null) {
- shouldBe("e.style.webkitTextDecorationStyle", "'" + value + "'");
- shouldBe("e.style.getPropertyCSSValue('-webkit-text-decoration-style').toString()", "'" + type + "'");
- shouldBe("e.style.getPropertyCSSValue('-webkit-text-decoration-style').cssText", "'" + value + "'");
+ shouldBe("e.style.textDecorationStyle", "'" + value + "'");
+ shouldBe("e.style.getPropertyCSSValue('text-decoration-style').toString()", "'" + type + "'");
+ shouldBe("e.style.getPropertyCSSValue('text-decoration-style').cssText", "'" + value + "'");
} else
- shouldBeNull("e.style.getPropertyCSSValue('-webkit-text-decoration-style')");
+ shouldBeNull("e.style.getPropertyCSSValue('text-decoration-style')");
}
function testComputedStyleValue(type, value)
{
computedStyle = window.getComputedStyle(e, null);
- shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-style').toString()", "'" + type + "'");
- shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-style').cssText", "'" + value + "'");
- shouldBe("computedStyle.webkitTextDecorationStyle", "'" + value + "'");
+ shouldBe("computedStyle.getPropertyCSSValue('text-decoration-style').toString()", "'" + type + "'");
+ shouldBe("computedStyle.getPropertyCSSValue('text-decoration-style').cssText", "'" + value + "'");
+ shouldBe("computedStyle.textDecorationStyle", "'" + value + "'");
}
function testValue(value, elementValue, elementStyle, computedValue, computedStyle)
{
if (value != null)
- e.style.webkitTextDecorationStyle = value;
+ e.style.textDecorationStyle = value;
testElementStyle(elementStyle, elementValue);
testComputedStyleValue(computedStyle, computedValue);
debug('');
}
-description("Test to make sure -webkit-text-decoration-style property returns CSSPrimitiveValue properly.")
+description("Test to make sure text-decoration-style property returns CSSPrimitiveValue properly.")
var testContainer = document.createElement("div");
testContainer.contentEditable = true;
document.body.appendChild(testContainer);
-testContainer.innerHTML = '<div id="test-parent" style="-webkit-text-decoration-style: dashed !important;">hello <span id="test-ancestor">world</span></div>';
+testContainer.innerHTML = '<div id="test-parent" style="text-decoration-style: dashed !important;">hello <span id="test-ancestor">world</span></div>';
debug("Ancestor should not inherit 'dashed' value from parent (fallback to initial 'solid' value):")
e = document.getElementById('test-ancestor');
testValue(null, "", null, "solid", "[object CSSPrimitiveValue]");
@@ -43,7 +43,7 @@ testValue(null, "dashed", "[object CSSPrimitiveValue]", "dashed", "[object CSSPr
testContainer.innerHTML = '<div id="test-js">test</div>';
debug("JavaScript setter tests for valid, initial, invalid and blank values:");
e = document.getElementById('test-js');
-shouldBeNull("e.style.getPropertyCSSValue('-webkit-text-decoration-style')");
+shouldBeNull("e.style.getPropertyCSSValue('text-decoration-style')");
debug("\nValid value 'solid':");
testValue("solid", "solid", "[object CSSPrimitiveValue]", "solid", "[object CSSPrimitiveValue]");

Powered by Google App Engine
This is Rietveld 408576698