| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |