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

Side by Side 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: rebased Created 3 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 (async function(testRunner) {
2 let {page, session, dp} = await testRunner.startHTML(`
3 <div id='mydiv'>div from page</div>
4 `, `Tests that console.memory works correct.`);
5
6 dp.Runtime.enable();
7 session.evaluate(`
8 var frame = document.documentElement.appendChild(document.createElement('ifr ame'));
9 frame.src = '${testRunner.url('../resources/iframe.html')}';
10 frame.onload = function() {
11 var location = frame.contentWindow.location;
12 frame.remove();
13 memory = console.__lookupGetter__('memory').call(location);
14 console.log(memory.constructor.constructor('return document.querySelector( "#mydiv").textContent')());
einbinder 2017/06/26 22:59:23 The constructor is a function, so constructor.cons
dgozman 2017/06/26 23:28:54 I have no idea, but I preserved the original code.
15 }
16 `);
17 var result = await dp.Runtime.onceConsoleAPICalled();
18 testRunner.log('=== Dump console message ===');
19 testRunner.log(result.params.args[0].value);
20 testRunner.completeTest();
21 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698