Summary: | prefetch categorization is exactly wrong | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Gavin Peters <gavinp> | ||||||||||||
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Critical | CC: | abarth, commit-queue, darin, leonclarke, webkit.review.bot | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
Attachments: |
|
Description
Gavin Peters
2010-07-20 10:30:57 PDT
Created attachment 62093 [details]
proposed fix to prefetching
Comment on attachment 62093 [details]
proposed fix to prefetching
Ugg... I'm embarrassed that I missed this in the code review.
WebCore/ChangeLog:8
+ No new tests. (OOPS!)
Can we test this issue? In case, we can't land the patch with the OOPS here.
Created attachment 62117 [details]
now with a test
I have now created a test (onload events issued early in the buggy version, so this test just looks at the x,y of a contained image from a page at the time of onload).
Attachment 62117 [details] did not pass style-queue:
Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/ChangeLog:8: Line contains tab character. [whitespace/tab] [5]
LayoutTests/ChangeLog:8: Line contains tab character. [whitespace/tab] [5]
LayoutTests/ChangeLog:9: Line contains tab character. [whitespace/tab] [5]
Total errors found: 3 in 6 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 62118 [details]
now sans tabs
Created attachment 62120 [details]
don't lie about dumprendertree
abarth reminded me this test runs fine in a browser, so don't say it won't.
Comment on attachment 62118 [details]
now sans tabs
Why does the test say it requires DumpRenderTree? I don’t see anything in the test that requires it. Why doesn’t the test explain what success looks like and what failure looks like?
A good test explains what it tests, and makes failure vs. success clear.
Fix is fine, although I'd prefer to make the #if even cleaner by putting the body outside the class definition:
inline bool CachedResource::isPrefetch() const
{
#if ENABLE(LINK_PREFETCH)
return type() == LinkPrefetch;
#else
return false;
#endif
}
Then the class definition will be easier to read.
review- just because it seems the test could be much clearer
(In reply to comment #7) > Why does the test say it requires DumpRenderTree? I don’t see anything in the test that requires it. Good, you fixed that. > Why doesn’t the test explain what success looks like and what failure looks like? > > A good test explains what it tests, and makes failure vs. success clear. Please consider fixing this too. Created attachment 62125 [details]
remediate to Darin's review
Darin,
Thanks for the review. You were right that the test was too obtuse; the new version explains what it is and reports its result in a much more user friendly way.
I've also reformatted the header per your advice.
Comment on attachment 62125 [details]
remediate to Darin's review
The test could still be more beautiful (e.g., properly indented, etc), but I think this is fine. (In general, I like diversity in the tests because you get more coverage of things you don't expect.)
Comment on attachment 62125 [details] remediate to Darin's review Clearing flags on attachment: 62125 Committed r63792: <http://trac.webkit.org/changeset/63792> All reviewed patches have been landed. Closing bug. |