Closed Bug 1279320 Opened 8 years ago Closed 6 years ago

Move browser_bug495058.js to urlbar directory

Categories

(Firefox :: Address Bar, defect, P5)

defect

Tracking

()

RESOLVED INACTIVE

People

(Reporter: mconley, Unassigned)

References

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

This was initially attempted in bug 1265055 but got backed out due to unexplained test failures. We should figure out what's going wrong here and then move it.
Priority: -- → P4
Whiteboard: [fxsearch]
Priority: P4 → P5
Assignee: nobody → standard8
Comment on attachment 8819849 [details]
Bug 1279320 - Move browser_bug495058.js to urlbar directory, and fix issues with timing when it is run on its own.

https://reviewboard.mozilla.org/r/99504/#review100024

\o/
Attachment #8819849 - Flags: review?(mconley) → review+
Unfortunately, try says this test now fails on Linux due to:

TEST-PASS | browser/base/content/test/urlbar/browser_bug495058.js | about:blank: uri loaded in detached tab - "about:blank" == "about:blank" - 
INFO - Buffered messages finished
INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/urlbar/browser_bug495058.js | about:blank: browser is focused - [object XULElement] == [object XULElement] - JS frame :: chrome://mochitests/content/browser/browser/base/content/test/urlbar/browser_bug495058.js :: <TOP_LEVEL> :: line 35
INFO - Stack trace:
INFO -     chrome://mochitests/content/browser/browser/base/content/test/urlbar/browser_bug495058.js:null:35
INFO -     Tester_execTest@chrome://mochikit/content/browser-test.js:737:9
INFO -     Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:657:7
INFO -     SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:744:59
INFO - TEST-PASS | browser/base/content/test/urlbar/browser_bug495058.js | about:blank: urlbar is empty - "" == "" - 
TEST-PASS | browser/base/content/test/urlbar/browser_bug495058.js | about:blank: placeholder text is present - "Search or enter address" == true - 

Mike, any ideas off hand why this might be?
Flags: needinfo?(mconley)
(In reply to Mark Banner (:standard8, limited time in Dec) from comment #4)
> 
> Mike, any ideas off hand why this might be?

Ah, I have an idea, one sec...
Flags: needinfo?(mconley)
Comment on attachment 8819849 [details]
Bug 1279320 - Move browser_bug495058.js to urlbar directory, and fix issues with timing when it is run on its own.

https://reviewboard.mozilla.org/r/99504/#review100228

::: browser/base/content/test/urlbar/browser_bug495058.js:20
(Diff revision 2)
> +    let eventPromise;
>      if (tab.linkedBrowser.isRemoteBrowser) {
> -      yield BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "MozAfterPaint");
> +      eventPromise = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "MozAfterPaint");
>      } else {
> -      yield BrowserTestUtils.waitForEvent(tab.linkedBrowser, "MozAfterPaint");
> +      eventPromise = BrowserTestUtils.waitForEvent(tab.linkedBrowser, "MozAfterPaint");
>      }

Bah - I missed this. :/

We're adding the MozAfterPaint event listener on the <xul:browser> that exists _before_ the tab tear out. That's no good - that browser is the one that gets closed once we do the frameloader swap. We're listening to the wrong thing.

You might be able to use BrowserTestUtils.domWindowOpened to get an early reference to the newly opened window, and then wait for the EndSwapDocShells event: http://searchfox.org/mozilla-central/rev/cc2a84852bd4e6f6d8d4d5b17b8382bb5d005749/toolkit/content/widgets/browser.xml#1405-1408

Once that's been done, try setting the MozAfterPaint event listeners. See if that helps?
Attachment #8819849 - Flags: review+ → review-
Comment on attachment 8819849 [details]
Bug 1279320 - Move browser_bug495058.js to urlbar directory, and fix issues with timing when it is run on its own.

Updated patch per discussions between Mike & I. Clearing review until I've verified the changes on try.
Flags: needinfo?(mconley)
Attachment #8819849 - Flags: review?(mconley)
Last time I tried this, on try, it was still randomly failing.

I don't think I have the knowledge to continue this. So un-assigning, and seeing if Mike wants to pick it up sometime.
Assignee: standard8 → nobody
Flags: needinfo?(mconley)
Maybe someday, but maybe after 57 is out the door (unless I run out of other things to do before then! :) )
Flags: needinfo?(mconley)
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: