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

Unified Diff: LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html

Issue 686763002: Fix Runtime.executionContextCreated for crafted iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html
diff --git a/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html b/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html
index 9607b91692b5b27bed7214486816a04bd02ddf73..329f35f84ba2df5ce0f89e032acfa35714463af0 100644
--- a/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html
+++ b/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html
@@ -11,6 +11,15 @@ function createFrame()
document.body.appendChild(frame);
}
+function createCraftedFrame()
+{
+ var frame = document.createElement("iframe");
+ frame.src = "../resources/blank.html";
+ frame.id = "crafted-iframe";
+ document.body.appendChild(frame);
+ frame.contentDocument.write("<div>crafted</div>");
+}
+
function test()
{
InspectorTest.evaluate = function(expression)
@@ -68,6 +77,25 @@ function test()
return;
}
InspectorTest.log("Frame's context was destroyed");
+ InspectorTest.log("Create new crafted frame");
+ InspectorTest.evaluate("createCraftedFrame()");
+ }
+
+ function craftedFrameContextCreated(executionContextId)
+ {
+ InspectorTest.log("Crafted frame context was created");
+ frameExecutionContextId = executionContextId;
+ InspectorTest.log("Remove crafted frame");
+ InspectorTest.evaluate("document.querySelector(\"#crafted-iframe\").remove()");
+ }
+
+ function craftedFrameContextDestroyedAfterFrameRemoved(executionContextId)
+ {
+ if (frameExecutionContextId !== executionContextId) {
+ InspectorTest.fail("Deleted frame had execution context with id = " + frameExecutionContextId + " , but executionContext with id = " + executionContextId + " was removed");
+ return;
+ }
+ InspectorTest.log("Crafted frame's context was destroyed");
InspectorTest.completeTest();
}
@@ -87,6 +115,9 @@ function test()
case 3:
frameContextCreatedAfterNavigation(executionContextId);
break;
+ case 4:
+ craftedFrameContextCreated(executionContextId);
+ break;
}
}
@@ -102,6 +133,9 @@ function test()
case 2:
frameContextDestroyedAfterFrameRemoved(executionContextId);
break;
+ case 3:
+ craftedFrameContextDestroyedAfterFrameRemoved(executionContextId);
+ break;
}
}
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698