Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 #inspected { | 4 #inspected { |
| 5 background-image: url("red green blue.jpg"); | 5 background: -webkit-image-set(url("chrome-search://theme/IDR_THEME_NTP_BACKG ROUND?pfncmbjabnpldlfbnmhnhblapoibfbei") 1x, url("chrome-search://theme/IDR_THEM E_NTP_BACKGROUND@2x?pfncmbjabnpldlfbnmhnhblapoibfbei") 2x); |
| 6 color: red; | 6 color: red; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 9 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 10 <script src="../../../http/tests/inspector/elements-test.js"></script> | 10 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 11 <script> | 11 <script> |
| 12 | 12 |
| 13 function test() | 13 function test() |
| 14 { | 14 { |
| 15 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); | 15 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); |
| 16 | 16 |
| 17 function step1() | 17 function step1() |
| 18 { | 18 { |
| 19 dumpDOM(InspectorTest.getMatchedStylePropertyTreeItem("background-image" )); | 19 dumpDOM(InspectorTest.getMatchedStylePropertyTreeItem("background")); |
| 20 dumpDOM(InspectorTest.getMatchedStylePropertyTreeItem("color")); | |
| 21 InspectorTest.completeTest(); | 20 InspectorTest.completeTest(); |
| 22 } | 21 } |
| 23 | 22 |
| 24 function dumpDOM(treeItem) | 23 function dumpDOM(treeItem) |
| 25 { | 24 { |
| 26 var element = treeItem.listItemElement.getElementsByClassName("value")[0 ]; | 25 var element = treeItem.listItemElement.getElementsByClassName("value")[0 ]; |
| 27 var result = []; | 26 var result = []; |
| 28 dumpNode(element, result); | 27 dumpNode(element, result); |
| 29 InspectorTest.addResult(result.join("")); | 28 InspectorTest.addResult(result.join("")); |
| 30 } | 29 } |
| 31 | 30 |
| 32 function dumpNode(parentNode, result) | 31 function dumpNode(parentNode, result) |
| 33 { | 32 { |
| 34 var childNodes = parentNode.childNodes; | 33 var childNodes = parentNode.childNodes; |
| 35 for (var i = 0; i < childNodes.length; ++i) { | 34 for (var i = 0; i < childNodes.length; ++i) { |
| 36 var node = childNodes[i]; | 35 var node = childNodes[i]; |
| 37 switch (node.nodeType) { | 36 switch (node.nodeType) { |
| 38 case Node.ELEMENT_NODE: | 37 case Node.ELEMENT_NODE: |
| 39 if (node.getAttribute("is") === "color-swatch") | 38 dumpNode(node, result); |
| 40 result.push("[] " + node.textContent); | |
| 41 else | |
| 42 dumpNode(node, result); | |
| 43 break; | 39 break; |
| 44 case Node.TEXT_NODE: | 40 case Node.TEXT_NODE: |
| 45 result.push(node.nodeValue); | 41 result.push(node.nodeValue); |
| 46 break; | 42 break; |
| 47 } | 43 } |
| 48 } | 44 } |
| 49 } | 45 } |
| 50 } | 46 } |
| 51 | 47 |
| 52 </script> | 48 </script> |
| 53 </head> | 49 </head> |
| 54 <body onload="runTest()"> | 50 <body onload="runTest()"> |
| 55 <p> | 51 <p> |
| 56 Tests that url(...) with space-delimited color names as filename segments do not contain color swatches. Bug <a href="http://bugs.webkit.org/show_bug.cgi?id=106 770">106770</a>. | 52 Tests that multiple URLs which are long are not squashed into a single URL. Bug <a href="http://bugs.webkit.org/show_bug.cgi?id=590172">590172</a>. |
|
lushnikov
2016/03/03 05:05:41
bugs.webkit.org?..
| |
| 57 </p> | 53 </p> |
| 58 <div id="inspected"></div> | 54 <div id="inspected"></div> |
| 59 </body> | 55 </body> |
| 60 </html> | 56 </html> |
| OLD | NEW |