Closed
Bug 605784
Opened 14 years ago
Closed 14 years ago
Event listener "pageshow" for tabs let waitForPageLoad abort too early
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: whimboo, Assigned: ahal)
References
Details
(Whiteboard: [mozmill-1.5.2-][mozmill-2.0+])
Attachments
(2 files)
3.86 KB,
patch
|
harth
:
review+
|
Details | Diff | Splinter Review |
497 bytes,
application/javascript
|
Details |
+++ This bug was initially created as a clone of Bug #604878 +++
With the fix on bug 604878 we can now exactly wait for the page loaded event for each individual tab. The only downside is, that it doesn't work with bfcache yet. To make that work the "pageshow" event can be processed instead of the "load" event.
I had already implemented that solution but a couple of tests failed afterward. It mainly happened when a new tab gets created and a page is directly loaded.
It should be investigated and I would like to have this feature in Mozmill-1.5.2.
Did you have time to do this? I really hesitate to touch this code as it is very regression prone. Do we have a demonstrated need for this in 1.5.2?
Reporter | ||
Comment 2•14 years ago
|
||
No, lets skip this. There is no pressure on it. In such a case we would have to use waitForElement instead.
Assignee | ||
Updated•14 years ago
|
Whiteboard: [mozmill-1.5.2-] → [mozmill-1.5.2-][mozmill-2.0?]
Is this really necessary for 2.0? What does this enable you to do that you can't now? Can you attach a testcase that clearly and succintly demonstrates the problem?
Comment 4•14 years ago
|
||
Ran into this yesterday, ex (http://hg.mozilla.org/qa/mozmill-tests/rev/b24479a1b338). One case was in checking for elements on a page that was loaded completely before private browsing. On exit of private browsing (bfcache), there was a waitForPageLoad that wasn't sufficient. Test needed a waitForElement
Reporter | ||
Comment 5•14 years ago
|
||
Clint, right now waitForPageLoad() doesn't reliable wait for the page to be loaded. So whenever we restore tabs (exit of private browsing mode, session restore, or the back and forward buttons) you cannot use waitForPageLoad but have to waitForElement.
(In reply to comment #5)
> Clint, right now waitForPageLoad() doesn't reliable wait for the page to be
> loaded. So whenever we restore tabs (exit of private browsing mode, session
> restore, or the back and forward buttons) you cannot use waitForPageLoad but
> have to waitForElement.
Ok, that makes it more clear to me. Thanks.
Whiteboard: [mozmill-1.5.2-][mozmill-2.0?] → [mozmill-1.5.2-][mozmill-2.0+]
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•14 years ago
|
||
I came up with this patch which seems to work.
All I can say is that:
1) I created a test case that fails without this patch, and passes with it.
2) It doesn't break any of our mutt tests.
Attachment #523442 -
Flags: feedback?
Assignee | ||
Comment 8•14 years ago
|
||
Henrik, do you remember which tests started failing when you tried doing this? The above patch seems to work, but I'm not sure how to properly test it.
Reporter | ||
Comment 9•14 years ago
|
||
No sorry. But you should run your patch with all of our tests in default. All tests should pass, if one fails you know it has been regressed something.
Assignee | ||
Comment 10•14 years ago
|
||
I'll do that and that should be good for regressions, but what about testing whether or not this bug is actually fixed?
I can say that my attached test passes, but I don't know if this is actually solving the problem. Could you provide some more specific STR?
Reporter | ||
Comment 11•14 years ago
|
||
The back and forward buttons are the best proof of the patch. Also a normal reload should fetch the data from the cache.
Assignee | ||
Comment 12•14 years ago
|
||
Comment on attachment 523442 [details] [diff] [review]
WIP Patch v1
I'm going to go ahead and flag this for review. It doesn't break anything that I've tested and waitForPageLoad now works when using the browser back/forward buttons.
Attachment #523442 -
Flags: review?(fayearthur+bugs)
Comment 13•14 years ago
|
||
Comment on attachment 523442 [details] [diff] [review]
WIP Patch v1
Review of attachment 523442 [details] [diff] [review]:
Looks good.
Attachment #523442 -
Flags: review?(fayearthur+bugs) → review+
Reporter | ||
Comment 14•14 years ago
|
||
We really need at least one test here. I'm a bit worried that in the current state we can't use our existent Mozmill tests with the version on master to make sure we don't break anything.
Andrew, does this patch apply cleanly on hotfix-1.5 so you could simply execute a testrun against all of our tests - if not done yet?
Flags: in-testsuite?
Comment 15•14 years ago
|
||
(In reply to comment #14)
> We really need at least one test here. I'm a bit worried that in the current
> state we can't use our existent Mozmill tests with the version on master to
> make sure we don't break anything.
>
> Andrew, does this patch apply cleanly on hotfix-1.5 so you could simply execute
> a testrun against all of our tests - if not done yet?
There is a test attached to this bug and we will land that. The test does fail without the patch and passes with the patch in place.
Assignee | ||
Comment 16•14 years ago
|
||
master: https://github.com/mozautomation/mozmill/commit/776625521d639ce3f480fe0eb73a11e5f0abcd94
Checked in the test as well.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Attachment #523442 -
Flags: feedback?
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•