Closed Bug 913780 Opened 11 years ago Closed 11 years ago

Permanent OS X mochitest-bc orange on UX: TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/customizableui/test/browser_877178_unregisterArea.js | Everything should be in its default state.

Categories

(Firefox :: Toolbars and Customization, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

(Keywords: intermittent-failure, Whiteboard: [Australis:M9][Australis:P1])

Attachments

(3 files)

As of https://tbpl.mozilla.org/?tree=UX&rev=53f83c3fc0aa: Pushlog: https://hg.mozilla.org/projects/ux/pushloghtml?startID=392&endID=393 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/customizableui/test/browser_877178_unregisterArea.js | Everything should be in its default state. TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/customizableui/test/browser_877178_unregisterArea.js | With a new toolbar and default placements, everything should still be in a default state. TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/customizableui/test/browser_877178_unregisterArea.js | When the toolbar is unregistered, everything should still be in a default state. TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/customizableui/test/browser_877447_skip_missing_ids.js | Should be in the default state. TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/customizableui/test/browser_877447_skip_missing_ids.js | Should be back in the default state, despite unknown button ID in placements. Looks the same on all OS X versions, not happening anywhere besides OS X. Note that there are other tests that verify that things are in the default state, and they succeeded. I don't know why these are failing, but not the other ones. Perhaps other tests (or these tests?) call reset() and that eliminates the cause of the issue here. Matt, was there anything tricky about this merge?
Flags: needinfo?(mnoorenberghe+bmo)
Casual look suggests this might be the new social mark button, which changes currentset (and, on UX, therefore changes placements). That new test should probably be resetting currentset once it's done. Shane, does that sound plausible?
Flags: needinfo?(mnoorenberghe+bmo) → needinfo?(mixedpuppy)
(In reply to :Gijs Kruitbosch from comment #1) > Casual look suggests this might be the new social mark button, which changes > currentset (and, on UX, therefore changes placements). That new test should > probably be resetting currentset once it's done. Shane, does that sound > plausible? Testing locally at least confirms that, when run independently, the customizableUI tests are fine. When run after *only* browser/base/content/test/social tests, they are not. Marking the dependency.
Depends on: 891219
Hmm. Looks like it's *not* the newly introduced test in and of itself, but browser_social_chatwindow_resize.js. This causes us to overflow, which changes currentSet (which I'd argue is a bug on the CustomizableUI side). Somehow, after the resizing is done, post-bug-891219, we stay overflowed. I don't know why. This means inDefaultState is false once that test has run. Reverting the two patches on UX, there are no, at the end of that particular test, we'd no longer be overflowing, and inDefaultState is true.
(In reply to :Gijs Kruitbosch from comment #3) > Reverting the two patches on UX, there are no, at the end of that particular > test, we'd no longer be overflowing, and inDefaultState is true. English is hard. I meant: Reverting the two patches on UX, at the end of that particular test, we no longer overflow and inDefaultState is true (i.e., expected behaviour).
I don't understand what's going on here. The overflow/resize events seem to happen in a similar timeframe, AFAICT, but somehow the widths reported are drastically different, and on current UX (ie, broken version) we end up with the splitter in the overflow panel, but not the webrtc, social-share-button, and social-toolbar-item: [00:28:45.079] [node.id for (node of document.getElementById("nav-bar").customizationTarget.childNodes)].join(',') [00:28:45.082] "urlbar-container,webrtc-status-button,social-share-button,social-toolbar-item" This is particularly strange because the splitter is meant to come straight after the urlbar-container. In any case, on broken UX, all the items in the overflow panel get a minsize of close to 1000, whereas when I back out the social patch, it's around 400 (meaning, when the test does its final resize back to 'normal' size, everything gets neatly put back). (tracking, because I only just realized I totally forgot)
Blocks: australis
Severity: normal → critical
Whiteboard: [Australis:M9][Australis:P1]
Depends on: 913972
So I dug into this in the weekend and this morning, and had a lot of help from Shane. Some things that may be useful: 1. To easily reproduce, just run ./mach mochitest-browser browser/base/content/test/social/browser_social_chatwindow_resize.js --keep-open At the end of the test, the navbar is overflowing with just the urlbar showing. That shouldn't happen. (CustomizableUI.inDefaultState is false at this point... which should also not happen, but that's bug 913972) This test is what causes the failures in our CustomizableUI tests later on. 2. Only backing out the new social marks button doesn't fix this. In other words, the test regression has to do with the removal of the old social marks button, which was inside the social-toolbar-item. 3. I *think* this is essentially to do with the overflow handler firing once the resizing code has restored the original window size. Before the removal of the old social marks button, it would fire when the window was still small. This causes a problem because previously, because the overflow fired for a small window, the minSize associated with the buttons that end up in the overflow panel was 'small' (around 4-500) and now it is 'big' (around 1008). This means that when the resize call fires at the end of the test, we don't restore any of the items, as the window isn't big enough. I don't know what's causing this difference. However, it is also strange that it fires when it does, and that the clientWidth and scrollWidth values (of the navbar) are different at this point (ie, whatever's firing the overflow event thinks there is still some kind of overflow). In particular, clientWidth is 1008, scrollWidth is 1012. AFAICT only the urlbar, urlbar-splitter, social-toolbar-item, and social-share-button are in the navbar at this point. The former takes 1008 pixels in width, and has no margin. The splitter takes 8 pixels but has 4 pixels of negative margin on either side. The social toolbar item and social share button are both hidden/empty (width 0), so shouldn't come into this. I am at a loss as to where the 4 pixels are meant to come from. 4. Considering all this, I also have no idea why this is only happening on OS X. I can reproduce on retina, but I don't know if it's retina-specific or OS X specific (in particular, I don't know what our test machines on TBPL are using) 5. Applying this patch to the test: https://pastebin.mozilla.org/3003440 fixes the issue in question, according to Shane. I don't understand why that'd help, either, although I suspect it might be to do with the provider being removed later than it is now (this would reduce the width of the social-toolbar-item). I've logged a bunch of info and will attach that shortly. Jared, can you help out here? I'm reaching the end of my sanity in terms of figuring out what's causing this issue.
Flags: needinfo?(mixedpuppy) → needinfo?(jaws)
Attached file Log of broken case
Attached file working-log.txt
Ok, I've got some time while I wait for some perf bisections to build, so I'm going to poke at this.
This problem is reproducible on non-Retina displays.
My initial guess as to the cause of the issue (although it doesn't explain why it is OSX only) is based on how we are coalescing the resize events.
Flags: needinfo?(jaws)
So, the 4px discrepancy is the search splitter. We then overflow that. We should (a) not overflow it, and (b) we should make it update its location (or lack thereof) when we overflow items so that if the search bar (dis)appears, the splitter (dis)appears with it. This is enough to fix the test, but will not reinsert the splitter, which might break other things. This is because the ordering of elements changes because of the overflow, and so the conditions for inserting the splitter aren't met. We'll fix that in bug 913972.
Attachment #801747 - Flags: review?(jaws)
Assignee: nobody → gijskruitbosch+bugs
Comment on attachment 801747 [details] [diff] [review] make overflowable toolbar care about search splitter, Review of attachment 801747 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the removal of the Cu.reportError line.
Attachment #801747 - Flags: review?(jaws) → review+
(In reply to Jared Wein [:jaws] from comment #15) > Comment on attachment 801747 [details] [diff] [review] > make overflowable toolbar care about search splitter, > > Review of attachment 801747 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=me with the removal of the Cu.reportError line. Landed as: https://hg.mozilla.org/projects/ux/rev/4777f3127bba .
Status: NEW → ASSIGNED
This is gone.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Future
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: