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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html b/third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html
index a3f4835950900be276695ddd21d004236edf3004..cf01696434742a0df626ccfa830a45f846b2984f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html
@@ -3,24 +3,16 @@
<script src="../inspector-test.js"></script>
<script>
-function test()
+async function test()
{
- function addUISourceCode(url, isContentScript)
- {
- var contentProvider = Common.StaticContentProvider.fromString(url, Common.resourceTypes.Script, "");
- var networkProject = Bindings.NetworkProject.forTarget(InspectorTest.mainTarget);
- var uiSourceCode = networkProject.addFile(contentProvider, InspectorTest.mainFrame(), isContentScript);
- return uiSourceCode;
- }
-
var rootURL = "http://localhost:8080/LayoutTests/inspector/debugger/";
var sourcesNavigatorView = new Sources.SourcesNavigatorView();
sourcesNavigatorView.show(UI.inspectorView.element);
InspectorTest.addResult("\n\n================================================");
InspectorTest.addResult("Adding urls");
- addUISourceCode(rootURL + "foo/bar/script.js", false);
- var contentUISourceCode = addUISourceCode(rootURL + "foo/bar/contentScript2.js?a=1", true);
+ await InspectorTest.addScriptUISourceCode(rootURL + "foo/bar/script.js", '', false);
+ var contentUISourceCode = await InspectorTest.addScriptUISourceCode(rootURL + "foo/bar/contentScript2.js?a=1", '', true, 42);
InspectorTest.dumpNavigatorView(sourcesNavigatorView);
InspectorTest.addResult("\n\n================================================");

Powered by Google App Engine
This is Rietveld 408576698