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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html

Issue 2747863007: DevTools: clean up tests to not depend on NetworkProject.addFile method (Closed)
Patch Set: typo Created 3 years, 9 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 4
5 <script> 5 <script>
6 function test() 6 async function test()
7 { 7 {
8 function addUISourceCode(url, isContentScript)
9 {
10 var contentProvider = Common.StaticContentProvider.fromString(url, Commo n.resourceTypes.Script, "");
11 var networkProject = Bindings.NetworkProject.forTarget(InspectorTest.mai nTarget);
12 var uiSourceCode = networkProject.addFile(contentProvider, InspectorTest .mainFrame(), isContentScript);
13 return uiSourceCode;
14 }
15
16 var rootURL = "http://localhost:8080/LayoutTests/inspector/debugger/"; 8 var rootURL = "http://localhost:8080/LayoutTests/inspector/debugger/";
17 var sourcesNavigatorView = new Sources.SourcesNavigatorView(); 9 var sourcesNavigatorView = new Sources.SourcesNavigatorView();
18 sourcesNavigatorView.show(UI.inspectorView.element); 10 sourcesNavigatorView.show(UI.inspectorView.element);
19 11
20 InspectorTest.addResult("\n\n=============================================== ="); 12 InspectorTest.addResult("\n\n=============================================== =");
21 InspectorTest.addResult("Adding urls"); 13 InspectorTest.addResult("Adding urls");
22 addUISourceCode(rootURL + "foo/bar/script.js", false); 14 await InspectorTest.addScriptUISourceCode(rootURL + "foo/bar/script.js", '', false);
23 var contentUISourceCode = addUISourceCode(rootURL + "foo/bar/contentScript2. js?a=1", true); 15 var contentUISourceCode = await InspectorTest.addScriptUISourceCode(rootURL + "foo/bar/contentScript2.js?a=1", '', true, 42);
24 InspectorTest.dumpNavigatorView(sourcesNavigatorView); 16 InspectorTest.dumpNavigatorView(sourcesNavigatorView);
25 17
26 InspectorTest.addResult("\n\n=============================================== ="); 18 InspectorTest.addResult("\n\n=============================================== =");
27 InspectorTest.addResult("Removing contentScripts project"); 19 InspectorTest.addResult("Removing contentScripts project");
28 contentUISourceCode.project().removeProject(); 20 contentUISourceCode.project().removeProject();
29 InspectorTest.dumpNavigatorView(sourcesNavigatorView); 21 InspectorTest.dumpNavigatorView(sourcesNavigatorView);
30 InspectorTest.completeTest(); 22 InspectorTest.completeTest();
31 } 23 }
32 </script> 24 </script>
33 25
34 </head> 26 </head>
35 <body onload="runTest()"> 27 <body onload="runTest()">
36 <p>Verify that removal of one of the multiple projects, all of which are associa ted with the same 28 <p>Verify that removal of one of the multiple projects, all of which are associa ted with the same
37 frame, doesn't lead navigator to discard the frame treenode.</p> 29 frame, doesn't lead navigator to discard the frame treenode.</p>
38 </p> 30 </p>
39 </body> 31 </body>
40 32
41 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698