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

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

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 <!doctype html>
2 <html>
3 <head>
4 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource s/inspector-protocol-test.js"></script>
5 <script>
6 function appendIframe()
7 {
8 var frame = document.createElement("iframe");
9 frame.src = "resources/console-log-navigate.html";
10 document.body.appendChild(frame);
11 return new Promise((resolve) => frame.onload = resolve);
12 }
13
14 function createIframeAndRunTest()
15 {
16 var frame = document.createElement("iframe");
17 frame.id = "iframe";
18 frame.src = "resources/console-log-navigate-on-load.html";
19 frame.onload = () => runTest();
20 document.body.appendChild(frame);
21 }
22
23 function test()
24 {
25 InspectorTest.sendCommandPromise("Runtime.enable", {})
26 .then(() => checkExpression("logArray()"))
27 .then(() => checkExpression("logDate()"))
28 .then(() => checkExpression("logDateWithArg()"))
29 .then(() => InspectorTest.completeTest());
30
31 function checkExpression(expression)
32 {
33 var contextId;
34 InspectorTest.waitForEventPromise("Runtime.executionContextCreated")
35 .then((result) => contextId = result.params.context.id);
36 return InspectorTest.sendCommandPromise("Runtime.evaluate", { expression : "appendIframe()", awaitPromise: true})
37 .then(() => InspectorTest.sendCommandPromise("Runtime.evaluate", { e xpression: expression, contextId: contextId }))
38 .then((r) => logObject(r));
39 }
40
41 function logObject(result)
42 {
43 result.id = 0;
44 InspectorTest.logObject(result);
45 }
46 }
47 </script>
48 </head>
49 <body onload="createIframeAndRunTest()">
50 This tests how navigation is handled from inside debugger code (console.log).
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698