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

Unified Diff: LayoutTests/fast/dom/shadow/resources/shadow-dom.js

Issue 1187053004: Move backgroundColorOf/backgroundColorShouldBe to shadow-dom.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/dom/shadow/resources/shadow-dom.js
diff --git a/LayoutTests/fast/dom/shadow/resources/shadow-dom.js b/LayoutTests/fast/dom/shadow/resources/shadow-dom.js
index 7e0e99c6e5000ef0a594da8654314329d48b7d8e..19ba8e4e9d6fc2626e786b53b8024ff07c61da4d 100644
--- a/LayoutTests/fast/dom/shadow/resources/shadow-dom.js
+++ b/LayoutTests/fast/dom/shadow/resources/shadow-dom.js
@@ -275,7 +275,25 @@ function showComposedShadowTree(node)
debug('');
}
-function showNextNode(node) {
+function showNextNode(node)
+{
var next = internals.nextInComposedTree(node);
debug('Next node of [' + dumpNode(node) + '] is [' + dumpNode(next) + ']');
}
+
+function backgroundColorOf(selector)
+{
+ return window.getComputedStyle(getNodeInTreeOfTrees(selector)).backgroundColor;
+}
+
+function backgroundColorShouldBe(selector, expected)
+{
+ shouldBeEqualToString('backgroundColorOf(\'' + selector + '\')', expected);
+}
+
+function backgroundColorShouldNotBe(selector, color)
+{
+ var text = 'backgroundColorOf(\'' + selector + '\')';
+ var unevaledString = '"' + color.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"';
+ shouldNotBe(text, unevaledString);
+}
« no previous file with comments | « LayoutTests/fast/dom/shadow/hostcontext-pseudo-class.html ('k') | LayoutTests/fast/dom/shadow/style-and-shadow-element.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698