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

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

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 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.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.js
new file mode 100644
index 0000000000000000000000000000000000000000..1720c060fd38f7708559cfc6e821acb4a3fd3c78
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.js
@@ -0,0 +1,21 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startHTML(`
+ <div id='mydiv'>div from page</div>
+ `, `Tests that console.memory works correct.`);
+
+ dp.Runtime.enable();
+ session.evaluate(`
+ var frame = document.documentElement.appendChild(document.createElement('iframe'));
+ frame.src = '${testRunner.url('../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')());
+ }
+ `);
+ var result = await dp.Runtime.onceConsoleAPICalled();
+ testRunner.log('=== Dump console message ===');
+ testRunner.log(result.params.args[0].value);
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698