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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.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/persistence/persistence-sync-content-nodejs.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html
index 04dfca8678ed40c3e7c91429ae5b85c3657c4e0b..b465383019b6262623eb0be8a9dc15643c677b12 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html
@@ -6,7 +6,7 @@
<script src="./persistence-test.js"></script>
<script>
-function test()
+async function test()
{
// Pretend we are running under V8 front-end.
SDK.targetManager.mainTarget().setIsNodeJSForTest();
@@ -26,12 +26,7 @@ function test()
InspectorTest.addResult("\n Initial network content:");
InspectorTest.addResult(indent(nodeContent));
- // Add network UISourceCode.
- var networkProject = Bindings.NetworkProject.forTarget(SDK.targetManager.mainTarget());
- var resourceTreeModel = SDK.ResourceTreeModel.fromTarget(SDK.targetManager.mainTarget());
- var mainFrame = resourceTreeModel.mainFrame;
- var contentProvider = new Common.StaticContentProvider("http://127.0.0.1:8000/nodejs.js", Common.resourceTypes.Script, () => Promise.resolve(nodeContent));
- networkProject.addFile(contentProvider, mainFrame, false);
+ await InspectorTest.addScriptUISourceCode("http://127.0.0.1:8000/nodejs.js", nodeContent);
// Add filesystem UISourceCode and mapping.
var fs = new InspectorTest.TestFileSystem("file:///var/www");

Powered by Google App Engine
This is Rietveld 408576698