Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-wont-crash.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-wont-crash.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-wont-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9c11164fe3d87ce46600ad5ddde82467d4712f74 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-wont-crash.html |
| @@ -0,0 +1,35 @@ |
| +<!doctype html> |
| +<html> |
| +<head> |
| +<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
| +<script> |
| +function appendIframe() |
| +{ |
| + var frame = document.createElement("iframe"); |
| + frame.src = "resources/console-log-navigate.html"; |
| + document.body.appendChild(frame); |
| + return new Promise((resolve) => frame.onload = resolve); |
| +} |
| + |
| +function test() |
| +{ |
| + InspectorTest.sendCommandPromise("Runtime.enable", {}) |
| + .then(() => checkExpression("logArray()")) |
| + .then(() => checkExpression("logDate()")) |
| + .then(() => checkExpression("logDateWithArg()")) |
| + .then(() => InspectorTest.completeTest()); |
| + |
| + function checkExpression(expression) |
| + { |
| + var contextId; |
| + InspectorTest.waitForEventPromise("Runtime.executionContextCreated") |
| + .then((result) => contextId = result.params.context.id); |
| + return InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "appendIframe()", awaitPromise: true}) |
| + .then(() => InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: expression, contextId: contextId })); |
| + } |
| +} |
| +</script> |
| +</head> |
| +<body onload="runTest()"> |
| +</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.
|
| +</html> |