Closed Bug 685865 Opened 13 years ago Closed 13 years ago

Don't special case tabs for mozmillDocumentLoaded

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [mozmill-2.0+][mozmill-1.5.5+])

Attachments

(3 files)

One big mistake we made in the past was to special case the handling of the mozmillDocumentLoaded state for tabs. It absolutely makes no sense and I'm not sure how this would even work with e10s. We should stay in the scope of content and don't bridge over to chrome. Also in all other cases the window itself gets this property set. I run into this problem while working on the WindowWrapper class for in-content windows like normal tabs, or frames on bug 639870. Problem here is our MozMillController constructor which calls isLoaded(). This method only checks the internal window assigned to the controller and doesn't know anything about tabs and how to get the appropriate browser element (content -> chrome). Given that when a page is reloaded only the document gets replaced, but not the window, all properties set on this window will remain. So we are absolutely fine and stopping our behavior and special casing the tab window load state. A patch is upcoming. I hope that we can fold this into 2.0 and even 1.5.4. Especially the latter version is kinda important for our API rewrite.
Attachment #559456 - Flags: review?
Attachment #559456 - Flags: feedback?(fayearthur+bugs)
Attachment #559456 - Flags: review? → review?(ctalbert)
Attachment #559456 - Attachment description: Patch v1 → Patch v1 [mozmill 1.5.x]
Whiteboard: [mozmill-2.0?][mozmill-1.5.5?] → [mozmill-2.0+][mozmill-1.5.5+]
Comment on attachment 559456 [details] [diff] [review] Patch v1 (mozmill 1.5.x) [checked-in] Ok, It takes some judicious mxr'ing to get a handle on what is going on here. But essentially the old problem was that we'd sometimes set the mozmillDocumentLoaded attribute on the tabbrowser object rather than on the window of the document in question. We always want that set on the window of the document in question so we can check for it on the window element when we do our waitFor's. So, good catch. Some stuff to help with understanding: document.defaultView is: http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-document-defaultview And the old way we were using getBrowserForDocument: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#317 which doesn't give us what we want. r+
Attachment #559456 - Flags: review?(ctalbert) → review+
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Attachment #559456 - Flags: feedback?(fayearthur+bugs)
While working on the patch for Mozmill 2.0 one of the tests we have under Mutt revealed a failure if the document is 'null'. So we need an extra check here.
Attachment #559599 - Flags: review?(ctalbert)
Attachment #559456 - Attachment description: Patch v1 [mozmill 1.5.x] → Patch v1 (mozmill 1.5.x) [checked-in]
Patch for Mozmill 2.0. Due to the new bug 686030 I have had to disable a test in the test_waitForPageLoad.js module. Further I have switched the last two tests so we do not run into bug 672884. Otherwise it's identical to
Attachment #559601 - Flags: review?(ctalbert)
Clint, any chance you can review this code ASAP? Especially the hotfix patch for 1.5.5. Thanks.
Attachment #559599 - Flags: review?(ctalbert) → review+
Attachment #559601 - Flags: review?(ctalbert) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
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: