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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 function createShadowRoot() 1 function createShadowRoot()
2 { 2 {
3 var children = Array.prototype.slice.call(arguments); 3 var children = Array.prototype.slice.call(arguments);
4 if ((children[0] instanceof Object) && !(children[0] instanceof Node)) { 4 if ((children[0] instanceof Object) && !(children[0] instanceof Node)) {
5 var attributes = {}; 5 var attributes = {};
6 var parameter = {}; 6 var parameter = {};
7 for (var key in children[0]) { 7 for (var key in children[0]) {
8 if (key == 'mode' || key == 'delegatesFocus') 8 if (key == 'mode' || key == 'delegatesFocus')
9 parameter[key] = children[0][key]; 9 parameter[key] = children[0][key];
10 else 10 else
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 debug('Traverse in forward.'); 269 debug('Traverse in forward.');
270 showComposedShadowTreeByTraversingInForward(node); 270 showComposedShadowTreeByTraversingInForward(node);
271 271
272 debug('Traverse in backward.'); 272 debug('Traverse in backward.');
273 showComposedShadowTreeByTraversingInBackward(node); 273 showComposedShadowTreeByTraversingInBackward(node);
274 274
275 debug(''); 275 debug('');
276 } 276 }
277 277
278 function showNextNode(node) { 278 function showNextNode(node)
279 {
279 var next = internals.nextInComposedTree(node); 280 var next = internals.nextInComposedTree(node);
280 debug('Next node of [' + dumpNode(node) + '] is [' + dumpNode(next) + ']'); 281 debug('Next node of [' + dumpNode(node) + '] is [' + dumpNode(next) + ']');
281 } 282 }
283
284 function backgroundColorOf(selector)
285 {
286 return window.getComputedStyle(getNodeInTreeOfTrees(selector)).backgroundCol or;
287 }
288
289 function backgroundColorShouldBe(selector, expected)
290 {
291 shouldBeEqualToString('backgroundColorOf(\'' + selector + '\')', expected);
292 }
293
294 function backgroundColorShouldNotBe(selector, color)
295 {
296 var text = 'backgroundColorOf(\'' + selector + '\')';
297 var unevaledString = '"' + color.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"';
298 shouldNotBe(text, unevaledString);
299 }
OLDNEW
« 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