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

Unified Diff: LayoutTests/fast/dom/shadow/user-modify-inheritance.html

Issue 692433003: Don't require getPropertyCSSValue in fast tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/dom/shadow/user-modify-inheritance.html
diff --git a/LayoutTests/fast/dom/shadow/user-modify-inheritance.html b/LayoutTests/fast/dom/shadow/user-modify-inheritance.html
index 328afa464510ac83c84b6348fa94b7c7c563523b..c420f3fa7e99f6beaf053962900ef6506caea315 100644
--- a/LayoutTests/fast/dom/shadow/user-modify-inheritance.html
+++ b/LayoutTests/fast/dom/shadow/user-modify-inheritance.html
@@ -16,21 +16,16 @@
<div id="sandbox2"></div>
<pre id="console"></pre>
<script>
-description("Tests to ensure that a '-webkit-user-modify' CSS porperty is not inherited across shadow boundaries.");
+description("Tests to ensure that a '-webkit-user-modify' CSS property is not inherited across shadow boundaries.");
if (window.testRunner)
testRunner.dumpAsText();
-function computedStyle(element, style) {
- var cs = window.getComputedStyle(element);
- if (!cs)
- return '(NA)';
- if (cs.getPropertyCSSValue(style))
- return cs.getPropertyCSSValue(style).cssText;
- return undefined;
+function computedStyle(element) {
+ return window.getComputedStyle(element).webkitUserModify;
}
function getUserModifyProperty(id) {
- return computedStyle(document.getElementById(id), userModifyPropertyName);
+ return computedStyle(document.getElementById(id));
}
function prepareNodeInShadowRoot(host, contentEditableAttributeValueForNode) {
@@ -43,14 +38,12 @@ function prepareNodeInShadowRoot(host, contentEditableAttributeValueForNode) {
return nodeInShadow;
}
-var userModifyPropertyName = '-webkit-user-modify';
-
-shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("contenteditable-host1"), null), userModifyPropertyName)', 'read-only');
-shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("contenteditable-host2"), "false"), userModifyPropertyName)', 'read-only');
-shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("contenteditable-host3"), "true"), userModifyPropertyName)', 'read-write');
-shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host1"), null), userModifyPropertyName)', 'read-only');
-shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host2"), "false"), userModifyPropertyName)', 'read-only');
-shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host3"), "true"), userModifyPropertyName)', 'read-write');
+shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("contenteditable-host1"), null))', 'read-only');
+shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("contenteditable-host2"), "false"))', 'read-only');
+shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("contenteditable-host3"), "true"))', 'read-write');
+shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host1"), null))', 'read-only');
+shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host2"), "false"))', 'read-only');
+shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host3"), "true"))', 'read-write');
document.getElementById('sandbox').appendChild(
createDOM('div', {'id': 'host', 'contenteditable': 'true'},

Powered by Google App Engine
This is Rietveld 408576698