Closed Bug 1245420 Opened 8 years ago Closed 8 years ago

devtools/client/framework/test aren't properly sorted

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: pbro, Assigned: pbro)

References

Details

Attachments

(1 file)

      No description provided.
Assignee: nobody → pbrosset
Blocks: 1229913
And browser_toolbox_toggle.js is too hard to read in its current form. This test needs rewriting.
Re-ordering tests made some of them fail because they would expect a given default panel to be selected.
Attachment #8715221 - Flags: review?(poirot.alex) → review+
Comment on attachment 8715221 [details]
MozReview Request: Bug 1245420 - Sort devtools/client/framework tests and clean-up browser_toolbox_toggle.js; r=ochameau

https://reviewboard.mozilla.org/r/33369/#review30085

Whaaaa this test was so hard to follow, this is so much simplier!!
nit: The commit message isn't perfect, you cleaned up more browser_toolbox_tabsswitch_shortcuts.js than the others.

::: devtools/client/framework/test/browser_toolbox_toggle.js:14
(Diff revision 1)
> +  Services.prefs.clearUserPref("devtools.toolbox.selectedTool");

I don't get this one?
It looks like a previous test mess up with this pref?
I imagine that will be hard to ensure all test to reset this pref. Ideally they would. It wouldn't be that hard if we have a shared head.js, but I think we are not there yet?
Otherwise here I see two options:
* Add a comment about this early cleaUserPref (this is not a common practice and a workaround)
* Use SpecialPowers.pushPrefEnv with an explicit selectedTool value.
Pending try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f268685dd543&group_state=expanded

(In reply to Alexandre Poirot [:ochameau] from comment #4)
> ::: devtools/client/framework/test/browser_toolbox_toggle.js:14
> (Diff revision 1)
> > +  Services.prefs.clearUserPref("devtools.toolbox.selectedTool");
> 
> I don't get this one?
> It looks like a previous test mess up with this pref?
> I imagine that will be hard to ensure all test to reset this pref. Ideally
> they would. It wouldn't be that hard if we have a shared head.js, but I
> think we are not there yet?
> Otherwise here I see two options:
> * Add a comment about this early cleaUserPref (this is not a common practice
> and a workaround)
> * Use SpecialPowers.pushPrefEnv with an explicit selectedTool value.
Good point. And we do have a shared head now, so I can easily clear this pref there, when a test ends. I hope that's not going to break dozens of other tests that implicitly assumed a given default tool would be selected.
Ended up adding a comment in the test instead, and filing bug 1245784 because I was seeing some weird crashes on TRY. I'm not sure they were related, but I prefer not to risk it.
I'll test again in bug 1245784.
had to back this out in https://treeherder.mozilla.org/#/jobs?repo=fx-team&revision=073aa15f8ea4 - seems one of this 2 pushes caused test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=7041768&repo=fx-team
Flags: needinfo?(pbrosset)
I have a fix for this issue and I've pushed it to try with many retriggers of the corresponding dt job:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a528779432bd&group_state=expanded&selectedJob=16382638
The test failure is gone now, but I'm now seeing fairly frequent failures of browser_markup_load_01.js on linux debug builds (for which there are no bugs on file yet).
Knowing that my patch only changes things in this directory devtools/client/framework/test/ there's absolutely no reasons it could cause this other test to fail now.
Flags: needinfo?(pbrosset)
https://hg.mozilla.org/mozilla-central/rev/a433d06618ad
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Depends on: 1249719
No longer depends on: 1249719
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: