| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/inspector-protocol-test.js"></script> | |
| 4 <script> | |
| 5 | |
| 6 function dumpInnerHtml() | |
| 7 { | |
| 8 frame = document.documentElement.appendChild(document.createElement("iframe"
)); | |
| 9 frame.src = "resources/iframe.html"; | |
| 10 frame.onload = function() | |
| 11 { | |
| 12 var location = frame.contentWindow.location; | |
| 13 frame.remove(); | |
| 14 memory = console.__lookupGetter__("memory").call(location); | |
| 15 console.log(memory.constructor.constructor("return document.querySelecto
r(\"#mydiv\").textContent")()); | |
| 16 } | |
| 17 } | |
| 18 | |
| 19 function test() | |
| 20 { | |
| 21 InspectorTest.sendCommandOrDie("Runtime.enable", {}); | |
| 22 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = dumpMessageAndCompl
eTest; | |
| 23 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "dumpInnerHtml
()" }); | |
| 24 | |
| 25 function dumpMessageAndCompleTest(result) | |
| 26 { | |
| 27 InspectorTest.log("=== Dump console message ==="); | |
| 28 InspectorTest.log(result.params.args[0].value); | |
| 29 InspectorTest.completeTest(); | |
| 30 } | |
| 31 } | |
| 32 </script> | |
| 33 </head> | |
| 34 <body onLoad="runTest();">Tests that console.memory works correct.</body> | |
| 35 <div id="mydiv">div from page</div> | |
| 36 </html> | |
| OLD | NEW |