WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
116709
Improve loader/go-back-cached-main-resource.html test
https://bugs.webkit.org/show_bug.cgi?id=116709
Summary
Improve loader/go-back-cached-main-resource.html test
Manuel Rego Casasnovas
Reported
2013-05-24 01:13:48 PDT
This bug is to improve the loader/go-back-cached-main-resource.html test with the ideas from the following comment by Alexey Proskuryakov in
bug #116670
#c2:
> (From update of
attachment 202708
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=202708&action=review
> > Getting rid of the timeout is a very welcome improvement, so r=me. Please consider the suggestion below. > > > LayoutTests/loader/resources/first-page.html:21 > > +<body onpageshow="registerListeners();"> > > This is quite misleading. We only need to register listeners on first load, they are already present when restoring from cache. But the function does more than its name says, which is why it's necessary to call it every time! > > One way to clean this up would be to rename the function to "didShowPage", and use event.persisted property to check if we are handling the initial load. Or just use an anonymous function, and register it as window.onpageshow = function (event) { ... }
Attachments
Patch
(4.40 KB, patch)
2013-05-24 01:20 PDT
,
Manuel Rego Casasnovas
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Manuel Rego Casasnovas
Comment 1
2013-05-24 01:20:16 PDT
Created
attachment 202782
[details]
Patch
Alexey Proskuryakov
Comment 2
2013-05-24 09:54:33 PDT
Comment on
attachment 202782
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=202782&action=review
Thank you!
> LayoutTests/loader/resources/first-page.html:11 > + if (!event.persisted) { > + // Our opener will tell us to perform various loads.
Just for the information, WebKit style is to prefer early returns, not deep indentation. I don't think that it's worth changing for this test, it's an extremely minor point.
WebKit Commit Bot
Comment 3
2013-05-24 10:16:03 PDT
Comment on
attachment 202782
[details]
Patch Clearing flags on attachment: 202782 Committed
r150645
: <
http://trac.webkit.org/changeset/150645
>
WebKit Commit Bot
Comment 4
2013-05-24 10:16:05 PDT
All reviewed patches have been landed. Closing bug.
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