Skip to content

Commit

Permalink
Bug 1796073 - [remote] Make columnNumber in exceptions and stackTrace…
Browse files Browse the repository at this point in the history
…s 0-based. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D162280
  • Loading branch information
whimboo committed Nov 17, 2022
1 parent 66dbc65 commit 365c5b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
3 changes: 1 addition & 2 deletions remote/webdriver-bidi/modules/windowglobal/log.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ class LogModule extends Module {
.filter(frame => !lazy.isChromeFrame(frame))
.map(frame => {
return {
columnNumber: frame.columnNumber,
columnNumber: frame.columnNumber - 1,
functionName: frame.functionName,
// Match WebDriver BiDi and convert Firefox's one-based line number.
lineNumber: frame.lineNumber - 1,
url: frame.filename,
};
Expand Down
4 changes: 2 additions & 2 deletions remote/webdriver-bidi/modules/windowglobal/script.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ class ScriptModule extends Module {
// WebDriver BiDi.
.map(frame => {
return {
columnNumber: frame.columnNumber,
columnNumber: frame.columnNumber - 1,
functionName: frame.functionName,
lineNumber: frame.lineNumber - 1,
url: frame.filename,
};
});

return {
columnNumber: stack.column,
columnNumber: stack.column - 1,
exception: lazy.serialize(
exception,
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,3 @@
[test_console_entry_sync_callstack[warn-True\]]
bug: 1744705
expected: FAIL

[test_console_entry_sync_callstack[assert-True\]]
expected: FAIL

[test_console_entry_sync_callstack[error-True\]]
expected: FAIL

[test_console_entry_sync_callstack[trace-True\]]
expected: FAIL

[test_javascript_entry_sync_callstack]
expected: FAIL

0 comments on commit 365c5b2

Please sign in to comment.