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

Unified Diff: LayoutTests/http/tests/inspector/runtime/runtime-crafted-frame-execution-context.html

Issue 686763002: Fix Runtime.executionContextCreated for crafted iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Do not force context initialization Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/inspector/runtime/runtime-crafted-frame-execution-context.html
diff --git a/LayoutTests/http/tests/inspector/resource-tree/resource-tree-crafted-frame-add.html b/LayoutTests/http/tests/inspector/runtime/runtime-crafted-frame-execution-context.html
similarity index 50%
copy from LayoutTests/http/tests/inspector/resource-tree/resource-tree-crafted-frame-add.html
copy to LayoutTests/http/tests/inspector/runtime/runtime-crafted-frame-execution-context.html
index fe2a02536b03afbb77e0924d8a788f0d3bbc05f4..c87742041fe863e8db18b63b634960437089e924 100644
--- a/LayoutTests/http/tests/inspector/resource-tree/resource-tree-crafted-frame-add.html
+++ b/LayoutTests/http/tests/inspector/runtime/runtime-crafted-frame-execution-context.html
@@ -1,28 +1,25 @@
<html>
<head>
<script src="../inspector-test.js"></script>
-<script src="../resources-test.js"></script>
-<script src="resource-tree-test.js"></script>
<script>
function createCraftedIframe()
{
var fabricatedFrame = document.createElement("iframe");
- fabricatedFrame.src = "#foo";
+ fabricatedFrame.src = "resources/blank.html";
document.body.appendChild(fabricatedFrame);
fabricatedFrame.contentDocument.write("<div>bar</div>");
}
function test()
{
- InspectorTest.runAfterResourcesAreFinished(["inspector-test.js", "resources-test.js", "resource-tree-test.js"], step1);
-
- function step1()
+ function onExecutionCintextCreated(event)
{
- InspectorTest.addSniffer(WebInspector.resourceTreeModel, "_frameAttached", InspectorTest.completeTest);
- InspectorTest.evaluateInPage("createCraftedIframe()");
+ InspectorTest.addResult("ExecutionContextCreated: isMainWorldContext=" + event.data.isMainWorldContext);
}
+ WebInspector.runtimeModel.addEventListener(WebInspector.RuntimeModel.Events.ExecutionContextCreated, onExecutionCintextCreated, {});
yurys 2014/10/31 15:08:03 Can you turn this into a protocol test so that we
eustas 2014/11/03 20:14:16 Great idea. Updading protocol test I've found that
+ InspectorTest.evaluateInPage("createCraftedIframe()", InspectorTest.completeTest);
}
</script>

Powered by Google App Engine
This is Rietveld 408576698