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

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

Issue 2318853002: [DevTools] Handle navigation in console.log (Closed)
Patch Set: Created 4 years, 3 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/inspecto r-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 test()
15 {
16 InspectorTest.sendCommandPromise("Runtime.enable", {})
17 .then(() => checkExpression("logArray()"))
18 .then(() => checkExpression("logDate()"))
19 .then(() => checkExpression("logDateWithArg()"))
20 .then(() => InspectorTest.completeTest());
21
22 function checkExpression(expression)
23 {
24 var contextId;
25 InspectorTest.waitForEventPromise("Runtime.executionContextCreated")
26 .then((result) => contextId = result.params.context.id);
27 return InspectorTest.sendCommandPromise("Runtime.evaluate", { expression : "appendIframe()", awaitPromise: true})
28 .then(() => InspectorTest.sendCommandPromise("Runtime.evaluate", { e xpression: expression, contextId: contextId }));
29 }
30 }
31 </script>
32 </head>
33 <body onload="runTest()">
34 </body>
dgozman 2016/09/07 00:21:03 This tests how navigation is handled from inside d
kozy 2016/09/07 00:50:16 Done.
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698