Closed Bug 1307687 Opened 8 years ago Closed 8 years ago

Intermittent browser/base/content/test/urlbar/browser_urlbarTrimURLs.js | expected page should have loaded - Got about:blank, expected http://example.com/

Categories

(Firefox :: Address Bar, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 53
Tracking Status
firefox50 --- unaffected
firefox51 --- unaffected
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: mak)

Details

(Keywords: intermittent-failure, Whiteboard: [fxsearch])

Attachments

(1 file)

this is similar to bug 1307676, it is using a custom load uri handler, while it should use BrowserTestUtils.browserLoaded
Mentor: mak77
Whiteboard: [good first bug][lang=js]
Priority: -- → P3
Whiteboard: [good first bug][lang=js] → [good first bug][lang=js][fxsearch]
let's just try to fix it, then.
Assignee: nobody → mak77
Mentor: mak77
Priority: P3 → P1
Whiteboard: [good first bug][lang=js][fxsearch] → [fxsearch]
Comment on attachment 8810893 [details]
Bug 1307687 - Intermittent load failure in browser_urlbarTrimURLs.js.

https://reviewboard.mozilla.org/r/93176/#review93154

::: browser/base/content/test/urlbar/browser_urlbarTrimURLs.js:1
(Diff revision 1)
> -/* Any copyright is dedicated to the Public Domain.
> +add_task(function* test() {

Nit: for my sanity, give this a better name or just get rid of it altogether. Then I don't need to remember if named function expressions create globals and thus conflict with using add_task or not. :-)

::: browser/base/content/test/urlbar/browser_urlbarTrimURLs.js:6
(Diff revision 1)
> -}
> -
> -function test() {
> -  const prefname = "browser.urlbar.trimURLs";
>  
> -  gBrowser.selectedTab = gBrowser.addTab();
> +  registerCleanupFunction(function* () {

Has someone actually task-ified `registerCleanupFunction` by now?
Attachment #8810893 - Flags: review?(gijskruitbosch+bugs) → review+
(In reply to :Gijs Kruitbosch (PTO Nov. 17-20 inclusive) from comment #8)
> > -  gBrowser.selectedTab = gBrowser.addTab();
> > +  registerCleanupFunction(function* () {
> 
> Has someone actually task-ified `registerCleanupFunction` by now?

what do you mean by task-ified? it accepts generator functions so far.
(In reply to Marco Bonardo [::mak] from comment #9)
> (In reply to :Gijs Kruitbosch (PTO Nov. 17-20 inclusive) from comment #8)
> > > -  gBrowser.selectedTab = gBrowser.addTab();
> > > +  registerCleanupFunction(function* () {
> > 
> > Has someone actually task-ified `registerCleanupFunction` by now?
> 
> what do you mean by task-ified? it accepts generator functions so far.

Does it treat them like generator functions instead of normal functions, though? It didn't use to... a lot of the customizableui tests have extra add_task() clauses in order to do async "cleanup" things.
it yields over the generator function, so it can either be a generator or return a promise. I think it's about 2 years that it works.
(In reply to Marco Bonardo [::mak] from comment #11)
> it yields over the generator function, so it can either be a generator or
> return a promise. I think it's about 2 years that it works.

Right, looks like bug 1000512 - the CUI tests are mostly older than when that got fixed. :-)
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/aca647243c52
Intermittent load failure in browser_urlbarTrimURLs.js. r=Gijs
https://hg.mozilla.org/mozilla-central/rev/aca647243c52
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: