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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-handle-navigate.js

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: 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.startBlank(`This tests how navigati on is handled from inside debugger code (console.log).`);
3
4 await session.evaluateAsync(`
5 function appendIframe(url) {
6 var frame = document.createElement('iframe');
7 frame.id = 'iframe';
8 frame.src = url;
9 document.body.appendChild(frame);
10 return new Promise(resolve => frame.onload = resolve);
11 }
12 appendIframe('${testRunner.url('../resources/console-log-navigate-on-load.ht ml')}')
13 `);
14
15 await dp.Runtime.enable();
16 await checkExpression('logArray()');
17 await checkExpression('logDate()');
18 await checkExpression('logDateWithArg()');
19 testRunner.completeTest();
20
21 async function checkExpression(expression) {
22 var contextId;
23 dp.Runtime.onceExecutionContextCreated().then(result => contextId = result.p arams.context.id);
24 await session.evaluateAsync(`appendIframe('${testRunner.url('../resources/co nsole-log-navigate.html')}')`);
25 testRunner.log(`Got new context: ${contextId !== undefined}`);
26 testRunner.logMessage(await dp.Runtime.evaluate({ expression: expression, co ntextId: contextId }));
27 }
28 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698