Closed Bug 840292 Opened 7 years ago Closed 7 years ago

The debugger's xpcshell tests should use listTabs/attachTab instead of listContexts

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: fitzgen, Assigned: jimb)

Details

(Whiteboard: [good-first-bug][lang=js][mentor=past])

Attachments

(1 file)

Since we have spec'd out listTabs/attachTab now, we should start using them in our tests so that we more closely match how the actual debugger server and client are actually used.

Should probably make changes to testactors.js to be more like testcompatactors.js from bug 795368 and use the attachTestTabAndResume helper (from the same bug) instead of attachTestGlobalClientAndResume.
Priority: -- → P3
Whiteboard: [good-first-bugs]
Whiteboard: [good-first-bugs] → [good-first-bug][lang=js][mentor=past]
QA Contact: jimb
The original protocol specification had a "listContexts" request, but that
was only ever implemented in the test harness. The real server has always
used a browser-appropriate "listTabs" request. The latter is now
documented, and the former has been removed from the spec.

This is preparation for using a common root actor implementation for all
servers: the xpcshell tests now actually use the protocol such a common
root actor would speak.
Assignee: nobody → jimb
Status: NEW → ASSIGNED
Attachment #745258 - Flags: review?(dcamp)
Comment on attachment 745258 [details] [diff] [review]
Change debugging server xpcshell tests to use a "listTabs" request, rather than a "listContexts" request.

Review of attachment 745258 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/devtools/debugger/tests/unit/test_dbgactor.js
@@ +19,5 @@
>    gClient = new DebuggerClient(transport);
>    gClient.addListener("connected", function(aEvent, aType, aTraits) {
> +    gClient.listTabs((aResponse) => {
> +      do_check_true('tabs' in aResponse);
> +      for each (let tab in aResponse.tabs) {

While you're here can you make that a for..of?
Attachment #745258 - Flags: review?(dcamp) → review+
(In reply to Dave Camp (:dcamp) from comment #3)
> While you're here can you make that a for..of?

Done.

https://hg.mozilla.org/integration/mozilla-inbound/rev/f0653eab4d95
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Firefox 23
https://hg.mozilla.org/mozilla-central/rev/f0653eab4d95
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.