| 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> | 4 <script> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 RuntimeAgent.evaluate("var doc = document.implementation.createHTMLDocument(
''); doc.lastChild.innerHTML = '<span></span>'; doc.lastChild", step1); | 8 RuntimeAgent.evaluate("var doc = document.implementation.createHTMLDocument(
''); doc.lastChild.innerHTML = '<span></span>'; doc.lastChild", step1); |
| 9 | 9 |
| 10 function step1(error, result, wasThrown) | 10 function step1(error, result, wasThrown) |
| 11 { | 11 { |
| 12 var spanWrapper = WebInspector.runtimeModel.createRemoteObject(result); | 12 var spanWrapper = WebInspector.runtimeModel.createRemoteObject(result); |
| 13 spanWrapper.pushNodeToFrontend(step2); | 13 spanWrapper.pushNodeToFrontend(step2); |
| 14 } | 14 } |
| 15 | 15 |
| 16 function step2(nodeId) | 16 function step2(nodeId) |
| 17 { | 17 { |
| 18 var node = WebInspector.domModel.nodeForId(nodeId); | 18 var node = WebInspector.domModel.nodeForId(nodeId); |
| 19 InspectorTest.assertTrue(node, "Node object should be resovled"); | 19 InspectorTest.assertTrue(node, "Node object should be resovled"); |
| 20 WebInspector.RemoteObject.resolveNode(node, undefined, step3); | 20 node.resolveToObject(undefined, step3); |
| 21 } | 21 } |
| 22 | 22 |
| 23 function step3(remoteObject) | 23 function step3(remoteObject) |
| 24 { | 24 { |
| 25 InspectorTest.addResult("Alien node should resolve to null: " + remoteOb
ject); | 25 InspectorTest.addResult("Alien node should resolve to null: " + remoteOb
ject); |
| 26 InspectorTest.completeTest(); | 26 InspectorTest.completeTest(); |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| 30 </script> | 30 </script> |
| 31 </head> | 31 </head> |
| 32 | 32 |
| 33 <body onload="runTest()"> | 33 <body onload="runTest()"> |
| 34 <p> | 34 <p> |
| 35 Tests that resolveNode from alien document does not crash. https://bugs.webkit.o
rg/show_bug.cgi?id=71806. | 35 Tests that resolveNode from alien document does not crash. https://bugs.webkit.o
rg/show_bug.cgi?id=71806. |
| 36 </p> | 36 </p> |
| 37 | 37 |
| 38 </body> | 38 </body> |
| 39 </html> | 39 </html> |
| OLD | NEW |