Closed Bug 945729 Opened 11 years ago Closed 10 years ago

Replace status codes with string based messages

Categories

(Testing :: Marionette Client and Harness, defect, P2)

defect

Tracking

(firefox40 fixed)

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: ato, Assigned: ato)

References

(Blocks 1 open bug)

Details

(Keywords: pi-marionette-client, pi-marionette-server, pi-marionette-spec, Whiteboard: [marionette=1.0])

Attachments

(1 file, 1 obsolete file)

The WebDriver specification mandates that we use strings for status codes instead of numbers, which I think we should consider deprecated behaviour. However since no client bindings support status codes as strings yet we should preserve the backwards compatible behavour for some time. Since the status codes in Marionette appear to be hard coded, an abstraction on status code would let us switch behaviour as needed. See the status code section in the spec for further details: https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html#status-codes See also the spec bug on introducing a new “invalid argument” status code: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23950
Assignee: nobody → ato
Status: NEW → ASSIGNED
Status: ASSIGNED → NEW
Whiteboard: [spec]
Priority: -- → P2
Since this is going to be such a breaking change I am going to create a few blocking bugs so we can do this bit by bit
Depends on: 1101172
Working on this as part of a bigger series of patches. The client side and flipping the switch in the server will be done in this patch.
Status: NEW → ASSIGNED
Whiteboard: [spec] → [marionette=1.0]
Depends on: 1107706
Blocks: 1100545
No longer depends on: 1100545
Depends on: 1150522
Depends on: 1150523
Blocks: 1150527
Blocks: 1150528
Depends on: 1152425
Attached file MozReview Request: bz://945729/ato (obsolete) (deleted) —
/r/6729 - Bug 945729: Replace error number codes with strings Pull down this commit: hg pull -r 4debe2f4e0bc34d4a81530eda273f75f86f5af8d https://reviewboard-hg.mozilla.org/gecko/
Attachment #8589786 - Flags: review?(dburns)
We will expect some failures in the try job I pushed because we're waiting for bug 1152425 to land. Will do another try run after that's landed.
Comment on attachment 8589786 [details] MozReview Request: bz://945729/ato https://reviewboard.mozilla.org/r/6727/#review5637 ::: testing/marionette/error.js (Diff revision 1) > -error.byCode = n => lookup.get(n); > +// TODO(ato): Bug 1152409 Add more context to what this TODO is, the bug has no details about this Todo ::: testing/marionette/error.js (Diff revision 1) > +// TODO(ato): Bug 1152409 Add more context to this Todo ::: testing/marionette/elements.js (Diff revision 1) > - throw new ElementException("No such strategy", 500, null); > + throw new ElementException("No such strategy", "webdriver error", null); This should probably be `invalid selector` ::: testing/marionette/elements.js (Diff revision 1) > - throw new ElementException("No such strategy", 500, null); > + throw new ElementException("No such strategy", "webdriver error", null); This should probably be `invalid selector` ::: testing/marionette/listener.js (Diff revision 1) > - let command_id = msg.json.command_id; > + let cmdId = msg.json.command_id; Change the variable name back as it is useful to have them the same as the JSON variable name ::: testing/marionette/listener.js (Diff revision 1) > - let propertyName = msg.json.propertyName; > + let prop = msg.json.propertyName; Change the variable name back as it is useful to have them the same as the JSON variable name
Attachment #8589786 - Flags: review?(dburns)
https://reviewboard.mozilla.org/r/6727/#review5651 > This should probably be `invalid selector` Filed bug 1152682 to address this. > This should probably be `invalid selector` Filed bug 1152682 to address this.
Comment on attachment 8589786 [details] MozReview Request: bz://945729/ato /r/6729 - Bug 945729: Replace error number codes with strings Pull down this commit: hg pull -r f6cfc57056e59acd0b2be02fee85f7c7a62939f2 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8589786 - Flags: review?(dburns)
Comment on attachment 8589786 [details] MozReview Request: bz://945729/ato https://reviewboard.mozilla.org/r/6727/#review5783 Ship It!
Attachment #8589786 - Flags: review?(dburns) → review+
OS: Linux → All
Hardware: x86_64 → All
Flags: needinfo?(ato)
Full try run, unfortunately based on inbound because it depends on some patches that are there: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e5d7123f6236 The problem was introduced in the rebase.
Flags: needinfo?(ato)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Attachment #8589786 - Attachment is obsolete: true
Attachment #8618064 - Flags: review+
Product: Testing → Remote Protocol

Moving bugs for Marionette client due to component changes.

Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: