Closed Bug 1291322 Opened 4 years ago Closed 4 years ago

Manually throttle CssRuleView tests

Categories

(DevTools :: Inspector, defect, P1)

50 Branch
defect

Tracking

(firefox51 fixed)

RESOLVED FIXED
Firefox 51
Iteration:
51.1 - Aug 15
Tracking Status
firefox51 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

Details

(Whiteboard: [reserve-html])

Attachments

(1 file)

Throttle is creating non-deterministic behavior for the mochitests on the CssRuleView components, causing issues with modifying the internals of the inspector. Replace the throttle function in tests with a manually triggered throttle that can be controlled in a more deterministic manner.

https://dxr.mozilla.org/mozilla-central/rev/ffac2798999c5b84f1b4605a1280994bb665a406/devtools/client/inspector/rules/views/text-property-editor.js#79
Assignee: nobody → gtatum
Whiteboard: [devtools-html]
This patch provides a mechanism for overriding the throttle function in
inspector tests with a manually controllable throttle. I did modify a
few tests to not check for a second "ruleview-changed" as it required
using a setTimeout to defer the code to the next frame to get it to work
as it currently exists. I figured it was safer to just not flush the
throttle, and reduce how many "ruleview-changed" events that the test
expected.

Review commit: https://reviewboard.mozilla.org/r/68666/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/68666/
Attachment #8777066 - Flags: review?(ttromey)
Comment on attachment 8777066 [details]
Bug 1291322 - Manually throttle CssRuleView tests;

https://reviewboard.mozilla.org/r/68666/#review65736

This looks good to me.

As I mentioned on irc I'm vaguely concerned about new intermittents; but I suppose we'll know soon enough.

Thank you for doing this.
Attachment #8777066 - Flags: review?(ttromey) → review+
Whiteboard: [devtools-html] → [devtools-html] [triage]
Comment on attachment 8777066 [details]
Bug 1291322 - Manually throttle CssRuleView tests;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/68666/diff/1-2/
Pushed by gtatum@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5a12087afd6b
Manually throttle CssRuleView tests; r=tromey
Status: NEW → ASSIGNED
Iteration: --- → 51.1 - Aug 15
Flags: qe-verify-
Priority: -- → P1
Whiteboard: [devtools-html] [triage] → [reserve-html]
https://hg.mozilla.org/mozilla-central/rev/5a12087afd6b
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.