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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/switch-file.html

Issue 2747863007: DevTools: clean up tests to not depend on NetworkProject.addFile method (Closed)
Patch Set: remove all networkProject.addFile calls 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/inspector/sources/debugger-ui/switch-file.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/switch-file.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/switch-file.html
index 39e2923dd177389cab809674807f6b695a2be111..13f438e6c2b93a263c5fd2712a9bedfcf1d93ec0 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/switch-file.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/switch-file.html
@@ -3,16 +3,8 @@
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script src="../../../http/tests/inspector/debugger-test.js"></script>
<script>
-function test()
+async function test()
{
- var uiSourceCodes = [];
- function addUISourceCode(url)
- {
- var contentProvider = Common.StaticContentProvider.fromString(url, Common.resourceTypes.Script, "");
- var uiSourceCode = Bindings.NetworkProject.forTarget(InspectorTest.mainTarget).addFile(contentProvider, InspectorTest.mainFrame(), false);
- uiSourceCodes.push(uiSourceCode);
- }
-
var files = [
"foo.css",
"foo.js",
@@ -38,9 +30,11 @@ function test()
"bar/foo.js.map",
"bar/foo.ts",
"bar/foo" ];
+ files = files.map(file => 'http://example.com/' + file);
+ var uiSourceCodes = [];
for (var i = 0; i < files.length; ++i)
- addUISourceCode("http://example.com/" + files[i]);
+ uiSourceCodes.push(await InspectorTest.addScriptUISourceCode(files[i], ''));
dgozman 2017/03/16 00:17:10 I can feel how slow (and thus flaky) this is :-(
lushnikov 2017/03/16 06:30:50 Shouldn't be slow, but I migrated this onto PageMo
InspectorTest.addResult("Dumping next file for each file:");
for (var i = 0; i < uiSourceCodes.length; ++i) {

Powered by Google App Engine
This is Rietveld 408576698