| Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bf9439def9ff1b3bd44f4f6b27c3f51f7590e655
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html
|
| @@ -0,0 +1,36 @@
|
| +<html>
|
| +<head>
|
| +<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
|
| +<script>
|
| +
|
| +function dumpInnerHtml()
|
| +{
|
| + frame = document.documentElement.appendChild(document.createElement("iframe"));
|
| + frame.src = "resources/iframe.html";
|
| + frame.onload = function()
|
| + {
|
| + var location = frame.contentWindow.location;
|
| + frame.remove();
|
| + memory = console.__lookupGetter__("memory").call(location);
|
| + console.log(memory.constructor.constructor("return document.querySelector(\"#mydiv\").textContent")());
|
| + }
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + InspectorTest.sendCommandOrDie("Console.enable", {});
|
| + InspectorTest.eventHandler["Console.messageAdded"] = dumpMessageAndCompleTest;
|
| + InspectorTest.sendCommand("Runtime.evaluate", { "expression": "dumpInnerHtml()" });
|
| +
|
| + function dumpMessageAndCompleTest(result)
|
| + {
|
| + InspectorTest.log("=== Dump console message ===");
|
| + InspectorTest.log(result.params.message.text);
|
| + InspectorTest.completeTest();
|
| + }
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onLoad="runTest();">Tests that console.memory works correct.</body>
|
| +<div id="mydiv">div from page</div>
|
| +</html>
|
|
|