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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 8 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/debugger-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
index 087b3374755fe5d862eca763fd49119b55aebf13..006c915d0d71e5d677b927fc8ec6fb4d01962bec 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
@@ -578,29 +578,6 @@ InspectorTest.queryScripts = function(filter)
return filter ? scripts.filter(filter) : scripts;
};
-InspectorTest.createScriptMock = function(url, startLine, startColumn, isContentScript, source, target, preRegisterCallback)
-{
- target = target || SDK.targetManager.mainTarget();
- var debuggerModel = target.model(SDK.DebuggerModel);
- var scriptId = ++InspectorTest._lastScriptId + "";
- var lineCount = source.computeLineEndings().length;
- var endLine = startLine + lineCount - 1;
- var endColumn = lineCount === 1 ? startColumn + source.length : source.length - source.computeLineEndings()[lineCount - 2];
- var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!source.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m);
- var script = new SDK.Script(debuggerModel, scriptId, url, startLine, startColumn, endLine, endColumn, 0, "", isContentScript, false, undefined, hasSourceURL, source.length);
- script.requestContent = function()
- {
- var trimmedSource = SDK.Script._trimSourceURLComment(source);
- return Promise.resolve(trimmedSource);
- };
- if (preRegisterCallback)
- preRegisterCallback(script);
- debuggerModel._registerScript(script);
- return script;
-};
-
-InspectorTest._lastScriptId = 0;
-
InspectorTest.checkRawLocation = function(script, lineNumber, columnNumber, location)
{
InspectorTest.assertEquals(script.scriptId, location.scriptId, "Incorrect scriptId");

Powered by Google App Engine
This is Rietveld 408576698