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

Side by Side Diff: LayoutTests/inspector/sources/debugger-ui/last-execution-context.html

Issue 1171753002: DevTools console context defaults to the Service Worker, should not. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger-ui/last-execution-context-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/workspace-test.js"></script>
5 <script>
6
7 function test()
8 {
9 InspectorTest.createWorkspace(true);
10 var context = new WebInspector.Context();
11 context.addFlavorChangeListener(WebInspector.ExecutionContext, executionCont extChanged, this);
12 context.addFlavorChangeListener(WebInspector.Target, targetChanged, this);
13 new WebInspector.ExecutionContextSelector(InspectorTest.testTargetManager, c ontext);
14
15 function executionContextChanged(event)
16 {
17 var executionContext = event.data;
18 InspectorTest.addResult("Execution context selected: " + (executionConte xt.isMainWorldContext ? executionContext.target().name() + ":" + executionContex t.frameId : ""));
19 }
20
21 function targetChanged(event)
22 {
23 InspectorTest.addResult("Target selected: " + event.data.name());
24 }
25
26
27 InspectorTest.addResult("Adding page target:");
28 var pageTarget = InspectorTest.createMockTarget("page-target");
29 pageTarget.runtimeModel._executionContextCreated({id: "p1", name: "pageConte xt1", isPageContext: true, origin: "origin", name: "pageContext1Name", frameId: "pageFrame1"});
30 InspectorTest.addResult("");
31
32 InspectorTest.addResult("Adding sw target:");
33 var swTarget = InspectorTest.createMockTarget("sw-target");
34 swTarget.runtimeModel._executionContextCreated({id: "sw1", name: "swContext1 ", isPageContext: true, origin: "origin", name: "swContext1Name", frameId: ""});
35
36 InspectorTest.addResult("");
37 InspectorTest.addResult("Removing page target:");
38 pageTarget.runtimeModel._executionContextDestroyed("p1");
39
40 InspectorTest.addResult("");
41 InspectorTest.addResult("Readding page target:");
42 pageTarget.runtimeModel._executionContextCreated({id: "p2", name: "", isPage Context: true, origin: "", name: "", frameId: "pageFrame1"});
43
44 InspectorTest.completeTest();
45 }
46
47 </script>
48 </head>
49
50 <body onload="runTest()">
51 <p>
52 Tests that re-adding a removed target restores the last selected execution conte xt.
53 </p>
54
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger-ui/last-execution-context-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698