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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js

Issue 2748933002: DevTools: remove dead code from breakpoint-manager.js test (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
index 359aec2138e428dc922a0cb26efdf903c01983ca..5d5b11db15074b7d83f37dd5f619f64dfef288d8 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
@@ -63,56 +63,6 @@ InspectorTest.createWorkspaceWithTarget = function(ignoreEvents)
return target;
}
-InspectorTest.waitForWorkspaceUISourceCodeAddedEvent = function(callback, count, projectType)
-{
- InspectorTest.uiSourceCodeAddedEventsLeft = count || 1;
- InspectorTest.testWorkspace.removeEventListener(Workspace.Workspace.Events.UISourceCodeAdded, InspectorTest._defaultWorkspaceEventHandler);
- InspectorTest.testWorkspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, uiSourceCodeAdded);
-
- function uiSourceCodeAdded(event)
- {
- if (projectType && event.data.project().type() !== projectType)
- return;
- if (!projectType && event.data.project().type() === Workspace.projectTypes.Service)
- return;
- if (!(--InspectorTest.uiSourceCodeAddedEventsLeft)) {
- InspectorTest.testWorkspace.removeEventListener(Workspace.Workspace.Events.UISourceCodeAdded, uiSourceCodeAdded);
- InspectorTest.testWorkspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, InspectorTest._defaultWorkspaceEventHandler);
- }
- callback(event.data);
- }
-}
-
-InspectorTest.waitForWorkspaceUISourceCodeRemovedEvent = function(callback, count)
-{
- InspectorTest.uiSourceCodeRemovedEventsLeft = count || 1;
- InspectorTest.testWorkspace.removeEventListener(Workspace.Workspace.Events.UISourceCodeRemoved, InspectorTest._defaultWorkspaceEventHandler);
- InspectorTest.testWorkspace.addEventListener(Workspace.Workspace.Events.UISourceCodeRemoved, uiSourceCodeRemoved);
-
- function uiSourceCodeRemoved(event)
- {
- if (event.data.project().type() === Workspace.projectTypes.Service)
- return;
- if (!(--InspectorTest.uiSourceCodeRemovedEventsLeft)) {
- InspectorTest.testWorkspace.removeEventListener(Workspace.Workspace.Events.UISourceCodeRemoved, uiSourceCodeRemoved);
- InspectorTest.testWorkspace.addEventListener(Workspace.Workspace.Events.UISourceCodeRemoved, InspectorTest._defaultWorkspaceEventHandler);
- }
- callback(event.data);
- }
-}
-
-InspectorTest.addMockUISourceCodeToWorkspace = function(url, type, content)
-{
- var mockContentProvider = Common.StaticContentProvider.fromString(url, type, content);
- InspectorTest.testNetworkProject.addFile(mockContentProvider, null, false);
-}
-
-InspectorTest.addMockUISourceCodeViaNetwork = function(url, type, content, target)
-{
- var mockContentProvider = Common.StaticContentProvider.fromString(url, type, content);
- InspectorTest.testNetworkProject.addFile(mockContentProvider, target.resourceTreeModel.mainFrame, false);
-}
-
InspectorTest._defaultWorkspaceEventHandler = function(event)
{
var uiSourceCode = event.data;
@@ -121,68 +71,8 @@ InspectorTest._defaultWorkspaceEventHandler = function(event)
InspectorTest.addResult(`Workspace event: ${event.type.toString()}: ${uiSourceCode.url()}.`);
}
-InspectorTest.uiSourceCodeURL = function(uiSourceCode)
-{
- return uiSourceCode.url().replace(/.*LayoutTests/, "LayoutTests");
-}
-
-InspectorTest.dumpUISourceCode = function(uiSourceCode, callback)
-{
- InspectorTest.addResult("UISourceCode: " + InspectorTest.uiSourceCodeURL(uiSourceCode));
- if (uiSourceCode.contentType() === Common.resourceTypes.Script || uiSourceCode.contentType() === Common.resourceTypes.Document)
- InspectorTest.addResult("UISourceCode is content script: " + (uiSourceCode.project().type() === Workspace.projectTypes.ContentScripts));
- uiSourceCode.requestContent().then(didRequestContent);
-
- function didRequestContent(content, contentEncoded)
- {
- InspectorTest.addResult("Highlighter type: " + Bindings.NetworkProject.uiSourceCodeMimeType(uiSourceCode));
- InspectorTest.addResult("UISourceCode content: " + content);
- callback();
- }
-}
-
-InspectorTest.fileSystemUISourceCodes = function()
-{
- var uiSourceCodes = [];
- var fileSystemProjects = Workspace.workspace.projectsForType(Workspace.projectTypes.FileSystem);
- for (var project of fileSystemProjects)
- uiSourceCodes = uiSourceCodes.concat(project.uiSourceCodes());
- return uiSourceCodes;
-}
-
-InspectorTest.refreshFileSystemProjects = function(callback)
-{
- var barrier = new CallbackBarrier();
- var projects = Workspace.workspace.projects();
- for (var i = 0; i < projects.length; ++i)
- projects[i].refresh("/", barrier.createCallback());
- barrier.callWhenDone(callback);
-}
-
-InspectorTest.waitForGivenUISourceCode = function(name, callback)
-{
- var uiSourceCodes = Workspace.workspace.uiSourceCodes();
- for (var i = 0; i < uiSourceCodes.length; ++i) {
- if (uiSourceCodes[i].name() === name) {
- setImmediate(callback);
- return;
- }
- }
- Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, uiSourceCodeAdded);
-
- function uiSourceCodeAdded(event)
- {
- if (event.data.name() === name) {
- Workspace.workspace.removeEventListener(Workspace.Workspace.Events.UISourceCodeAdded, uiSourceCodeAdded);
- setImmediate(callback);
- }
- }
-}
-
InspectorTest.uiSourceCodes = {};
-InspectorTest.dumpTargetIds = false;
-
InspectorTest.initializeDefaultMappingOnTarget = function(target)
{
var defaultMapping = {
@@ -206,11 +96,6 @@ InspectorTest.initializeDefaultMappingOnTarget = function(target)
target.defaultMapping = defaultMapping;
}
-InspectorTest.dumpTarget = function(targetAware)
-{
- return InspectorTest.dumpTargetIds ? "target " + targetAware.target().id() + " " : "";
-}
-
InspectorTest.DebuggerModelMock = class extends SDK.SDKModel {
constructor(target)
{
@@ -287,7 +172,7 @@ InspectorTest.DebuggerModelMock = class extends SDK.SDKModel {
setBreakpointByURL(url, lineNumber, columnNumber, condition, callback)
{
- InspectorTest.addResult(" " + InspectorTest.dumpTarget(this) + "debuggerModel.setBreakpoint(" + [url, lineNumber, condition].join(":") + ")");
+ InspectorTest.addResult(" debuggerModel.setBreakpoint(" + [url, lineNumber, condition].join(":") + ")");
var breakpointId = url + ":" + lineNumber;
if (this._breakpoints[breakpointId]) {
@@ -318,7 +203,7 @@ InspectorTest.DebuggerModelMock = class extends SDK.SDKModel {
removeBreakpoint(breakpointId, callback)
{
- InspectorTest.addResult(" " + InspectorTest.dumpTarget(this) + "debuggerModel.removeBreakpoint(" + breakpointId + ")");
+ InspectorTest.addResult(" debuggerModel.removeBreakpoint(" + breakpointId + ")");
delete this._breakpoints[breakpointId];
if (callback)
setTimeout(callback, 0);
@@ -371,11 +256,11 @@ InspectorTest.setupLiveLocationSniffers = function()
{
InspectorTest.addSniffer(Bindings.DebuggerWorkspaceBinding.prototype, "createLiveLocation", function(rawLocation)
{
- InspectorTest.addResult(" Location created: " + InspectorTest.dumpTarget(rawLocation) + rawLocation.scriptId + ":" + rawLocation.lineNumber);
+ InspectorTest.addResult(" Location created: " + rawLocation.scriptId + ":" + rawLocation.lineNumber);
}, true);
InspectorTest.addSniffer(Bindings.DebuggerWorkspaceBinding.Location.prototype, "dispose", function()
{
- InspectorTest.addResult(" Location disposed: " + InspectorTest.dumpTarget(this._rawLocation) + this._rawLocation.scriptId + ":" + this._rawLocation.lineNumber);
+ InspectorTest.addResult(" Location disposed: " + this._rawLocation.scriptId + ":" + this._rawLocation.lineNumber);
}, true);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698