Chromium Code Reviews| OLD | NEW |
|---|---|
| (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> | |
| OLD | NEW |