WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
Bug 121628
Flaky Test: fast/history/history-back-while-pdf-in-pagecache.html
https://bugs.webkit.org/show_bug.cgi?id=121628
Summary
Flaky Test: fast/history/history-back-while-pdf-in-pagecache.html
zalan
Reported
2013-09-19 13:08:04 PDT
ssia
Attachments
Patch
(4.63 KB, patch)
2013-09-19 13:29 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(5.04 KB, patch)
2013-09-20 05:25 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2013-09-19 13:29:11 PDT
Created
attachment 212093
[details]
Patch
Alexey Proskuryakov
Comment 2
2013-09-19 15:54:19 PDT
Comment on
attachment 212093
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=212093&action=review
> LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html:20 > + // Inject this iframe to figure out when the pdf load is finished as the original <iframe> does not fire onload on history.back().
Can we use pageshow event after back()? Not sure if that would help, but this is what replaces the load event when a page comes from cache.
zalan
Comment 3
2013-09-20 05:24:26 PDT
(In reply to
comment #2
)
> (From update of
attachment 212093
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=212093&action=review
> > > LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html:20 > > + // Inject this iframe to figure out when the pdf load is finished as the original <iframe> does not fire onload on history.back(). > > Can we use pageshow event after back()? Not sure if that would help, but this is what replaces the load event when a page comes from cache.
Thanks for the hint. Using pageshow does make the testcase a bit better when it comes to differentiating WK1 and WK2 behaviour, but unfortunately it can't replace the iframe inject as the pageshow event on history navigation has no dependency on the iframe load AFAICT, and the test could still be flaky if we finish it before the actual pdf is finished loading.
zalan
Comment 4
2013-09-20 05:25:20 PDT
Created
attachment 212152
[details]
Patch
Alexey Proskuryakov
Comment 5
2013-09-20 11:22:17 PDT
> unfortunately it can't replace the iframe inject as the pageshow event on history navigation has no dependency on the iframe load AFAICT
The iframe itself will not need to load, as it comes from the b/f cache. But plug-ins certainly do break the model, as they are reconstructed later. Plug-ins always break it, because they can do loading at any time (e.g. the actual plug-in resource could be a manifest, and all resources would be loaded later).
zalan
Comment 6
2013-09-20 11:24:21 PDT
(In reply to
comment #5
)
> > unfortunately it can't replace the iframe inject as the pageshow event on history navigation has no dependency on the iframe load AFAICT > > The iframe itself will not need to load, as it comes from the b/f cache. But plug-ins certainly do break the model, as they are reconstructed later. Plug-ins always break it, because they can do loading at any time (e.g. the actual plug-in resource could be a manifest, and all resources would be loaded later).
Correct, I meant the re-constructed plugin load.
Alexey Proskuryakov
Comment 7
2013-09-20 11:26:01 PDT
Comment on
attachment 212152
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=212152&action=review
> LayoutTests/fast/history/history-back-while-pdf-in-pagecache-expected.html:16 > + }, 300);
I really don't like changing the timeout. If it needs to be longer than 0, the test _will_ fail on bots. There are lots of processes competing for CPU and memory, and being randomly frozen for a few seconds is normal.
> LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html:21 > + document.getElementById('container').innerHTML += '<iframe onload=\'done();\' src=\'../images/resources/green_rectangle.pdf\'></iframe>';
I don't think that this helps in a clean way. Iframe onload is fired before a plug-in displays its content, and there is no guarantee of ordering anyway. So, I think that this just adds a delay essentially.
zalan
Comment 8
2013-09-20 11:36:19 PDT
(In reply to
comment #7
)
> (From update of
attachment 212152
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=212152&action=review
> > > LayoutTests/fast/history/history-back-while-pdf-in-pagecache-expected.html:16 > > + }, 300); > > I really don't like changing the timeout. If it needs to be longer than 0, the test _will_ fail on bots. There are lots of processes competing for CPU and memory, and being randomly frozen for a few seconds is normal. > > > LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html:21 > > + document.getElementById('container').innerHTML += '<iframe onload=\'done();\' src=\'../images/resources/green_rectangle.pdf\'></iframe>'; > > I don't think that this helps in a clean way. Iframe onload is fired before a plug-in displays its content, and there is no guarantee of ordering anyway.
The forced layout should guarantee the ordering as it initiates the plugin content load before the inject happens, but I agree with you in general that the inject essentially just adds some delay. Though this delay is probably the best guess to cover the original pdf load as opposed to any timers. (while the best non-guessing would be some proper signalling and I am happy to use one if available)
Alexey Proskuryakov
Comment 9
2013-09-20 11:54:00 PDT
I'd like to know what Tim thinks about adding an Internals hook for when PDF content is ready. We don't have any other PDF subframe tests yet, but we should, and it would be nice to make them straightforward to write.
zalan
Comment 10
2013-09-20 11:56:22 PDT
(In reply to
comment #9
)
> I'd like to know what Tim thinks about adding an Internals hook for when PDF content is ready. We don't have any other PDF subframe tests yet, but we should, and it would be nice to make them straightforward to write.
Couldn't agree more. I was surprised to see that this was the first.
Alexey Proskuryakov
Comment 11
2013-10-03 13:35:34 PDT
Marked as flaky in
r156853
.
> I'd like to know what Tim thinks about adding an Internals hook for when PDF content is ready. <
Tim Horton
Comment 12
2013-10-03 13:39:05 PDT
(In reply to
comment #11
)
> Marked as flaky in
r156853
. > > > I'd like to know what Tim thinks about adding an Internals hook for when PDF content is ready. <
Doesn't seem unreasonable to me. Couldn't it be a more generic plugin thing, or is PDFPlugin the only one that receives data in the roundabout way?
Alexey Proskuryakov
Comment 13
2014-12-14 18:25:15 PST
This test also asserts in debug builds, which is tracked in <
rdar://problem/18216390
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug