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

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

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! Created 6 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 | LayoutTests/http/tests/inspector/elements/styles/update-locations-on-filesystem-scss-load.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector/debugger-test.js
diff --git a/LayoutTests/http/tests/inspector/debugger-test.js b/LayoutTests/http/tests/inspector/debugger-test.js
index d11a6204fbdbd2d21051b991456a2ef736be4225..42a3b3c1773cfec97dba08600de70fa6571bb9e0 100644
--- a/LayoutTests/http/tests/inspector/debugger-test.js
+++ b/LayoutTests/http/tests/inspector/debugger-test.js
@@ -95,17 +95,17 @@ InspectorTest.runAsyncCallStacksTest = function(totalDebuggerStatements, maxAsyn
function step2()
{
- InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused);
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
}
var step = 0;
var callStacksOutput = [];
- function didPaused(callFrames, reason, breakpointIds, asyncStackTrace)
+ function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
{
++step;
callStacksOutput.push(InspectorTest.captureStackTraceIntoString(callFrames, asyncStackTrace) + "\n");
if (step < totalDebuggerStatements) {
- InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, didPaused));
+ InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, didPause));
} else {
InspectorTest.addResult("Captured call stacks in no particular order:");
callStacksOutput.sort();
@@ -166,20 +166,20 @@ InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace
{
for (var i = 0; i < callFrames.length; i++) {
var frame = callFrames[i];
- var script = WebInspector.debuggerModel.scriptForId(frame.location.scriptId);
+ var script = WebInspector.debuggerModel.scriptForId(frame.location().scriptId);
var url;
var lineNumber;
if (script) {
url = WebInspector.displayNameForURL(script.sourceURL);
- lineNumber = frame.location.lineNumber + 1;
+ lineNumber = frame.location().lineNumber + 1;
} else {
url = "(internal script)";
lineNumber = "(line number)";
}
var s = " " + i + ") " + frame.functionName + " (" + url + (options.dropLineNumbers ? "" : ":" + lineNumber) + ")";
results.push(s);
- if (options.printReturnValue && frame.returnValue)
- results.push(" <return>: " + frame.returnValue.description);
+ if (options.printReturnValue && frame.returnValue())
+ results.push(" <return>: " + frame.returnValue().description);
}
}
@@ -188,7 +188,7 @@ InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace
while (asyncStackTrace) {
results.push(" [" + (asyncStackTrace.description || "Async Call") + "]");
- printCallFrames(asyncStackTrace.callFrames);
+ printCallFrames(WebInspector.DebuggerModel.CallFrame.fromPayloadArray(WebInspector.targetManager.activeTarget(), asyncStackTrace.callFrames));
if (asyncStackTrace.callFrames.peekLast().functionName === "testFunction")
break;
asyncStackTrace = asyncStackTrace.asyncStackTrace;
@@ -209,7 +209,7 @@ InspectorTest._pausedScript = function(callFrames, reason, auxData, breakpointId
{
if (!InspectorTest._quiet)
InspectorTest.addResult("Script execution paused.");
- InspectorTest._pausedScriptArguments = [callFrames, reason, breakpointIds, asyncStackTrace];
+ InspectorTest._pausedScriptArguments = [WebInspector.DebuggerModel.CallFrame.fromPayloadArray(WebInspector.targetManager.activeTarget(), callFrames), reason, breakpointIds, asyncStackTrace];
if (InspectorTest._waitUntilPausedCallback) {
var callback = InspectorTest._waitUntilPausedCallback;
delete InspectorTest._waitUntilPausedCallback;
@@ -364,7 +364,7 @@ InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent
var endLine = startLine + lineCount - 1;
var endColumn = lineCount === 1 ? startColumn + source.length : source.length - source.lineEndings()[lineCount - 2];
var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!source.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m);
- var script = new WebInspector.Script(scriptId, url, startLine, startColumn, endLine, endColumn, isContentScript, null, hasSourceURL);
+ var script = new WebInspector.Script(WebInspector.targetManager.activeTarget(), scriptId, url, startLine, startColumn, endLine, endColumn, isContentScript, null, hasSourceURL);
script.requestContent = function(callback)
{
var trimmedSource = WebInspector.Script._trimSourceURLComment(source);
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/elements/styles/update-locations-on-filesystem-scss-load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698