| 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();
|
| +})
|
|
|