| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 5 <script src="edit-dom-test.js"></script> | 5 <script src="edit-dom-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 // Save time on style updates. | 10 // Save time on style updates. |
| 11 WebInspector.inspectorView.showPanel("elements"); | |
| 12 WebInspector.StylesSidebarPane.prototype.update = function() {}; | 11 WebInspector.StylesSidebarPane.prototype.update = function() {}; |
| 13 WebInspector.MetricsSidebarPane.prototype.update = function() {}; | 12 WebInspector.MetricsSidebarPane.prototype.update = function() {}; |
| 14 | 13 |
| 15 InspectorTest.runTestSuite([ | 14 InspectorTest.runTestSuite([ |
| 16 function testSetUp(next) | 15 function testSetUp(next) |
| 17 { | 16 { |
| 18 InspectorTest.nodeWithId("authorShadowDOMElement"); | 17 InspectorTest.expandElementsTree(next); |
| 19 InspectorTest.nodeWithId("testSetAuthorShadowDOMElementAttribute", c
heckTree); | |
| 20 function checkTree() | |
| 21 { | |
| 22 InspectorTest.expandElementsTree(next); | |
| 23 } | |
| 24 }, | 18 }, |
| 25 | 19 |
| 26 function testSetAuthorShadowDOMElementAttribute(next) | 20 function testSetAuthorShadowDOMElementAttribute(next) |
| 27 { | 21 { |
| 28 InspectorTest.domActionTestForNodeId("testSetAuthorShadowDOMElementA
ttribute", "shadow-node-to-set-attribute", testBody, next); | 22 InspectorTest.domActionTestForNodeId("testSetAuthorShadowDOMElementA
ttribute", "shadow-node-to-set-attribute", testBody, next); |
| 29 | 23 |
| 30 function testBody(node, done) | 24 function testBody(node, done) |
| 31 { | 25 { |
| 32 InspectorTest.editNodePartAndRun(node, "webkit-html-attribute",
"bar=\"edited attribute\"", done, true); | 26 InspectorTest.editNodePartAndRun(node, "webkit-html-attribute",
"bar=\"edited attribute\"", done, true); |
| 33 } | 27 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 var container = document.getElementById(id); | 71 var container = document.getElementById(id); |
| 78 var root = container.createShadowRoot(); | 72 var root = container.createShadowRoot(); |
| 79 root.innerHTML = html; | 73 root.innerHTML = html; |
| 80 } | 74 } |
| 81 | 75 |
| 82 createRootWithContents("testEditAuthorShadowDOMAsHTML", "<div id='authorShadowDO
MElement'></div>"); | 76 createRootWithContents("testEditAuthorShadowDOMAsHTML", "<div id='authorShadowDO
MElement'></div>"); |
| 83 createRootWithContents("testSetAuthorShadowDOMElementAttribute", "<div foo='attr
ibute value' id='shadow-node-to-set-attribute'></div>"); | 77 createRootWithContents("testSetAuthorShadowDOMElementAttribute", "<div foo='attr
ibute value' id='shadow-node-to-set-attribute'></div>"); |
| 84 </script> | 78 </script> |
| 85 </body> | 79 </body> |
| 86 </html> | 80 </html> |
| OLD | NEW |