Open Bug 1099069 Opened 7 years ago Updated 7 years ago

Opening Update:Wizard window doesn't trigger a "domwindowopened" notification if the update failed patching

Categories

(Toolkit :: XUL Widgets, defect)

35 Branch
defect
Not set
normal

Tracking

()

People

(Reporter: cosmin-malutan, Unassigned)

Details

Attachments

(1 file)

Attached file testcase.js
The steps would be:
1 Download a nightly that's not latest ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/
2 Open the About:Update
3 Wait until the update begins
4 Go to profile directory, open "update.status" edit it by adding a new line with: "failed: 6\n", save it
5 In error console type: 
Components.classes["@mozilla.org/updates/update-prompt;1"].createInstance(Components.interfaces.nsIUpdatePrompt).checkForUpdates();
 >
 Result: The Update:Wizard page opens but in background and triggers no event



I attache the testcase, to ran it:
download mozmill environment from http://mozqa.com/mozmill-env/ and activate it
run the command:
> mozmill -t testcase.js -b <Firefox build path>
The problem here is that the new window opens before Mozmill actually starts the test. So it is clear why no events are happening. That means it is a special case, for the update wizard window. So in its open method we should check if it is already open and use that window. If not we do the waitForWindowState call.
This UI is a toolkit widget so moving component.

Per comment #1 this bug seems invalid.
Component: Installer → XUL Widgets
Product: Firefox → Toolkit
The bug might not be invalid but demonstrates a behavior of the old update ui, which might never occur normally. So the problem here is that when you open the about window and wait until the update check has been done, opening the old update dialog does not work. It is simply not opening. Means removing the 2s of sleep in the test makes it work for me. 

So something prevents the old dialog from opening. The code for forcing a fallback is not necessary and can also be commented out.
You need to log in before you can comment on or make changes to this bug.