Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html

Issue 2034203002: [DevTools] Improve MainThreadDebugger::memoryInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..1aa4138c9610ee85a3ab7e096d3db7abd6b90336
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html
@@ -0,0 +1,34 @@
+<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.body.innerHTML")());
dgozman 2016/06/03 23:59:07 document.querySelector("#mydiv").textContent
kozy 2016/06/04 00:13:27 Done.
+ }
+}
+
+function test()
+{
+ InspectorTest.sendCommandOrDie("Console.enable", {});
+ InspectorTest.eventHandler["Console.messageAdded"] = dumpMessageAndCompleTest;
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "dumpInnerHtml()" });
+
+ function dumpMessageAndCompleTest(result)
+ {
+ InspectorTest.log(result.params.message.text);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onLoad="runTest();">Tests that console.memory works correct.</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698