Commit 0d072847 authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[DevTools] Fix inspector-protocol/runtime/runtime-execution-contexts-events.html

It's too early to navigate frame when we get executeContextCreated.

BUG=596940
R=lushnikov@chromium.org

Review-Url: https://codereview.chromium.org/2291333002
Cr-Commit-Position: refs/heads/master@{#415423}
parent 079b912c
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
crbug.com/420008 inspector/tracing/worker-js-frames.html [ Pass Timeout Failure ] crbug.com/420008 inspector/tracing/worker-js-frames.html [ Pass Timeout Failure ]
crbug.com/420008 virtual/threaded/inspector/tracing/worker-js-frames.html [ Pass Timeout Failure ] crbug.com/420008 virtual/threaded/inspector/tracing/worker-js-frames.html [ Pass Timeout Failure ]
crbug.com/596940 inspector-protocol/runtime/runtime-execution-contexts-events.html [ Pass Timeout ]
crbug.com/597572 [ Debug ] http/tests/inspector/resource-tree/resource-tree-reload.html [ Pass Failure ] crbug.com/597572 [ Debug ] http/tests/inspector/resource-tree/resource-tree-reload.html [ Pass Failure ]
crbug.com/569901 crbug.com/24182 [ Debug ] jquery/manipulation.html [ Timeout Pass ] crbug.com/569901 crbug.com/24182 [ Debug ] jquery/manipulation.html [ Timeout Pass ]
......
...@@ -9,6 +9,7 @@ function createFrame() ...@@ -9,6 +9,7 @@ function createFrame()
frame.src = "../resources/blank.html"; frame.src = "../resources/blank.html";
frame.id = "iframe"; frame.id = "iframe";
document.body.appendChild(frame); document.body.appendChild(frame);
return new Promise((resolve) => frame.onload = resolve);
} }
function createCraftedFrame() function createCraftedFrame()
...@@ -39,7 +40,8 @@ function test() ...@@ -39,7 +40,8 @@ function test()
{ {
InspectorTest.log("Page context was created"); InspectorTest.log("Page context was created");
InspectorTest.log("Create new frame"); InspectorTest.log("Create new frame");
InspectorTest.evaluate("createFrame()"); InspectorTest.sendCommandPromise("Runtime.evaluate", {expression: "createFrame()", awaitPromise: true})
.then(() => navigateFrame());
} }
var frameExecutionContextId = 0; var frameExecutionContextId = 0;
...@@ -48,6 +50,10 @@ function test() ...@@ -48,6 +50,10 @@ function test()
{ {
InspectorTest.log("Frame context was created"); InspectorTest.log("Frame context was created");
frameExecutionContextId = executionContextId; frameExecutionContextId = executionContextId;
}
function navigateFrame()
{
InspectorTest.log("Navigate frame"); InspectorTest.log("Navigate frame");
InspectorTest.evaluate("window.frames[0].location = \"resources/runtime-events-iframe.html\""); InspectorTest.evaluate("window.frames[0].location = \"resources/runtime-events-iframe.html\"");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment