Closed Bug 1439711 Opened 8 years ago Closed 8 years ago

Refactor debugger server stepping tests

Categories

(DevTools :: Debugger, enhancement)

enhancement
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: jlast, Assigned: jlast)

References

Details

Attachments

(1 file, 1 obsolete file)

It would be nice if the stepping tests used async/await.
Attached patch ref-tests.patch (obsolete) — Splinter Review
Attachment #8952498 - Flags: review?(ttromey)
Comment on attachment 8952498 [details] [diff] [review] ref-tests.patch Review of attachment 8952498 [details] [diff] [review]: ----------------------------------------------------------------- Thank you for the patch. I think this makes the code much clearer. I found a few nits but nothing serious. ::: devtools/server/tests/unit/test_stepping-01.js @@ +13,4 @@ > var gCallback; > > function run_test() { > + do_test_pending(); I don't know the rationale for moving this. It's fine if it all works though. I noticed this is done in some files but not all of them... ::: devtools/server/tests/unit/test_stepping-02.js @@ +43,3 @@ > > + dumpn("Step Over to line 3"); > + const step1 = await stepIn(gClient, threadClient); The dump says "Step Over" but the code says step in. This appears in a few spots in this file. ::: devtools/server/tests/unit/test_stepping-03.js @@ +55,5 @@ > + this.a = 1; // 4 > + this.b = 2; // 5 > + } // 6 > + f(); // 7 > + `, // 4 The "// 4" on this line is mysterious. ::: devtools/server/tests/unit/test_stepping-05.js @@ +57,5 @@ > > + dumpn("Step In to line 5"); > + const step3 = await stepIn(gClient, threadClient); > + equal(step3.type, "paused"); > + equal(step3.frame.where.line, 4); The dump here says "line 5", but according to the code, there is no line 5 and the expected line is actually 4. And, the previous step went to line 4. This seems strange to me, I think at least the dump should be updated, and perhaps a comment explaining what is going on.
Attachment #8952498 - Flags: review?(ttromey) → review+
Attachment #8952498 - Attachment is obsolete: true
Attachment #8953212 - Flags: review+
Assignee: nobody → jlaster
Keywords: checkin-needed
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: