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

Unified Diff: third_party/WebKit/Source/devtools/front_end/Tests.js

Issue 2376583002: DevTools: remove WI.NetworkMapping.networkURL (Closed)
Patch Set: do not blackbox fs uiSourceCodes Created 4 years, 3 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/Source/devtools/front_end/Tests.js
diff --git a/third_party/WebKit/Source/devtools/front_end/Tests.js b/third_party/WebKit/Source/devtools/front_end/Tests.js
index 0089a703d0c7c5f4630543b97f59ef58e2a50b63..6c63b290f0008685d5f14c373c4d79505ff448a2 100644
--- a/third_party/WebKit/Source/devtools/front_end/Tests.js
+++ b/third_party/WebKit/Source/devtools/front_end/Tests.js
@@ -357,9 +357,8 @@ TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function()
function checkNoDuplicates() {
var uiSourceCodes = test.nonAnonymousUISourceCodes_();
for (var i = 0; i < uiSourceCodes.length; i++) {
- var scriptName = WebInspector.networkMapping.networkURL(uiSourceCodes[i]);
for (var j = i + 1; j < uiSourceCodes.length; j++)
- test.assertTrue(scriptName !== WebInspector.networkMapping.networkURL(uiSourceCodes[j]), "Found script duplicates: " + test.uiSourceCodesToString_(uiSourceCodes));
+ test.assertTrue(uiSourceCodes[i].url() !== uiSourceCodes[j].url(), "Found script duplicates: " + test.uiSourceCodesToString_(uiSourceCodes));
}
}
@@ -1070,7 +1069,7 @@ TestSuite.prototype.uiSourceCodesToString_ = function(uiSourceCodes)
{
var names = [];
for (var i = 0; i < uiSourceCodes.length; i++)
- names.push('"' + WebInspector.networkMapping.networkURL(uiSourceCodes[i]) + '"');
+ names.push('"' + uiSourceCodes[i].url() + '"');
return names.join(",");
};
@@ -1081,19 +1080,16 @@ TestSuite.prototype.uiSourceCodesToString_ = function(uiSourceCodes)
*/
TestSuite.prototype.nonAnonymousUISourceCodes_ = function()
{
- function filterOutAnonymous(uiSourceCode)
- {
- return !!WebInspector.networkMapping.networkURL(uiSourceCode);
- }
-
+ /**
+ * @param {!WebInspector.UISourceCode} uiSourceCode
+ */
function filterOutService(uiSourceCode)
{
return !uiSourceCode.isFromServiceProject();
}
var uiSourceCodes = WebInspector.workspace.uiSourceCodes();
- uiSourceCodes = uiSourceCodes.filter(filterOutService);
- return uiSourceCodes.filter(filterOutAnonymous);
+ return uiSourceCodes.filter(filterOutService);
};

Powered by Google App Engine
This is Rietveld 408576698