WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45430
http/tests/navigation/anchor-frames.html doesn't pass when not run in isolation
https://bugs.webkit.org/show_bug.cgi?id=45430
Summary
http/tests/navigation/anchor-frames.html doesn't pass when not run in isolation
Mihai Parparita
Reported
2010-09-08 18:10:44 PDT
http/tests/navigation/anchor-frames.html doesn't pass with TestShell
Attachments
Patch
(2.62 KB, patch)
2010-09-08 18:12 PDT
,
Mihai Parparita
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mihai Parparita
Comment 1
2010-09-08 18:12:04 PDT
Created
attachment 66978
[details]
Patch
Dirk Pranke
Comment 2
2010-09-08 18:22:56 PDT
this change LGTM. James, do you feel like rubber-stamping this?
James Robinson
Comment 3
2010-09-08 18:28:07 PDT
Comment on
attachment 66978
[details]
Patch I'd strongly prefer to know when TestShell is updating the scroll offset and having the test code run off of that. Running it in a setTimeout() might be racy depending on exactly when test shell updates the scroll offsets and is unreliable for a test.
James Robinson
Comment 4
2010-09-08 18:40:41 PDT
Alternately, decide we don't care about this test for TestShell and add it to the expectations. That makes me a little nervous but might a good option if it seems it will take a long time to debug what TestShell is doing.
James Robinson
Comment 5
2010-09-08 18:48:55 PDT
This test is currently failing on mac's DumpRenderTree as well (leopard and snow leopard). Sure this is a test shell problem?
Mihai Parparita
Comment 6
2010-09-08 19:11:34 PDT
Re-titling, since this appears to fail with the regular DRT (though I can only reproduce locally when using --iterations 2). The setTimeout wrapper does seem to fix that, but I'd like to understand why better first.
Mihai Parparita
Comment 7
2010-09-08 19:28:10 PDT
Not sure how the test ever worked. In FrameLoader::finishedParsing() we do things in this order: 1. Call FrameLoader::checkCompleted (which triggers the onload handler via FrameLoader::checkCallImplicitClose -> Document::implicitClose -> Document::dispatchWindowLoadEvent) 2. Call m_frame->view()->scrollToFragment(m_URL) So onload always fires before we scroll to the fragment. I think the original patch on this bug is the way to go, since the setTimeout(0) will definitely happen after both 1 and 2 above, so we'll always be scrolled. I'm going to be offline for a couple of hours. James/Dirk, feel free to either land this patch or back out
r67033
.
James Robinson
Comment 8
2010-09-08 19:48:45 PDT
Ahh, I see. So this patch is fine, then, since the setTimeout() will _always_ happen after the scroll.
James Robinson
Comment 9
2010-09-08 19:48:57 PDT
Comment on
attachment 66978
[details]
Patch I'll land this to fix the bots.
James Robinson
Comment 10
2010-09-08 19:50:47 PDT
Comment on
attachment 66978
[details]
Patch Clearing flags on attachment: 66978 Committed
r67051
: <
http://trac.webkit.org/changeset/67051
>
James Robinson
Comment 11
2010-09-08 19:51:01 PDT
All reviewed patches have been landed. Closing bug.
Mihai Parparita
Comment 12
2010-09-09 07:57:29 PDT
(In reply to
comment #7
)
> Not sure how the test ever worked.
I think I understand this better. The test has external resources (two scripts and a stylesheet). IIRC, stylesheets do not block, so in the uncached case, checkCompleted returns early (because of the numRequests(m_frame->document()) check) and we end up calling scrollToFragment before onload is dispatched. However, in the cached case, the resources are (presumably) loaded synchronously from the cache, so we have no outstanding requests. This is why the test passed when run in isolation (or even when running all of the http/tests/navigation tests, since it's the first one to use those resources in there), but failed when run twice or when being run with all the other tests on the bots.
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