Closed Bug 586640 Opened 14 years ago Closed 14 years ago

Timeout failure in waitForPageLoad when a page has already been loaded

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronmt, Assigned: whimboo)

References

Details

(Keywords: regression, Whiteboard: [mozmill-1.4.2+])

Attachments

(1 file, 1 obsolete file)

Attached file Testcase (testHomeButton.js) (obsolete) —
This bug was found when I was changing a test in bug 585775: [1] testPreferences/testSetToCurrentPage.js By converting the test to use a local-file, the timeout would occur after we press the Home button. The homepage is set to a local-file during the run of a test. [1] http://hg.mozilla.org/qa/mozmill-tests/file/8a7873bbfe8b/firefox/testPreferences/testSetToCurrentPage.js [2] Timeout occurs on this line http://hg.mozilla.org/qa/mozmill-tests/file/8a7873bbfe8b/firefox/testPreferences/testSetToCurrentPage.js#l83 I've attached a simple version of the test. Place it in the testPreferences folder and give it a try. The test will open a local-file. Open the preferences dialog and set that page to the current page. Open a second local-file. Click the home button. When we click the home button, the test times out with the wait.
Blocks: 585775
Keywords: regression
Whiteboard: [mozmill-1.4.2?]
Tested in 1.4.1: no issues
Comment on attachment 465227 [details] Testcase (testHomeButton.js) Can you please attach a testcase without any shared module dependency? thanks.
Attachment #465227 - Attachment is obsolete: true
I would assume its a regression from bug 503277. Before that patch had been landed we were using win.documentLoaded to check when a page has been successfully loaded. By using the property it was passing even when the page has already been loaded and waitForPageLoad has been called too late. We should still check this property before we start our loop to wait for the DOMContentLoaded event. Using that way we would return early and don't end up in a timeout. Heather, in my opinion it should block 1.4.2.
Blocks: 503277
Summary: Timeout failure in waitForPageLoad after Home button press (local-files) → Timeout failure in waitForPageLoad when a page has already been loaded
Attached patch Patch v1Splinter Review
The proposed way will fix the problem for all pages except error pages. There is still no reliable way to detect when those have been loaded.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Attachment #465263 - Flags: review?
Attachment #465263 - Flags: review? → review?(fayearthur+bugs)
marking blocking since its a regression from a recent feature.
Whiteboard: [mozmill-1.4.2?] → [mozmill-1.4.2+]
Comment on attachment 465263 [details] [diff] [review] Patch v1 looks good.
Attachment #465263 - Flags: review?(fayearthur+bugs) → review+
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: