Bug 45554 - compositing/iframes/iframe-src-change.html test fails on Windows
Summary: compositing/iframes/iframe-src-change.html test fails on Windows
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Windows 7
: P2 Normal
Assignee: Simon Fraser (smfr)
Depends on:
Reported: 2010-09-10 11:51 PDT by Simon Fraser (smfr)
Modified: 2010-09-10 14:24 PDT (History)
2 users (show)

See Also:

Patch (1.78 KB, patch)
2010-09-10 11:55 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (3.78 KB, patch)
2010-09-10 14:17 PDT, Simon Fraser (smfr)
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-09-10 11:51:25 PDT
This test fails on Windows (when building with compositing).

The reason is that the test sets the iframe source, and immediately dumps layers. On windows, it seems that resource loading is timer-based, so the iframe load doesn't happen until after the test completes.

We can fix this with a setTimeout in the test.
Comment 1 Adam Roben (:aroben) 2010-09-10 11:53:24 PDT
(In reply to comment #0)
> On windows, it seems that resource loading is timer-based, so the iframe load doesn't happen until after the test completes.

How does this work on Mac? Are we just getting lucky?
Comment 2 Simon Fraser (smfr) 2010-09-10 11:55:19 PDT
Created attachment 67215 [details]
Comment 3 Simon Fraser (smfr) 2010-09-10 12:18:56 PDT
I see the "about:blank" load happening via

 	WebKit.dll!WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader * loader=0x046959d8, WebCore::FrameLoadType type=FrameLoadTypeRedirectWithLockedBackForwardList, WTF::PassRefPtr<WebCore::FormState> prpFormState={...})  Line 1488	C++
 	WebKit.dll!WebCore::FrameLoader::loadWithNavigationAction(const WebCore::ResourceRequest & request={...}, const WebCore::NavigationAction & action={...}, bool lockHistory=false, WebCore::FrameLoadType type=FrameLoadTypeRedirectWithLockedBackForwardList, WTF::PassRefPtr<WebCore::FormState> formState={...})  Line 1411	C++
 	WebKit.dll!WebCore::FrameLoader::loadURL(const WebCore::KURL & newURL={...}, const WTF::String & referrer={...}, const WTF::String & frameName={...}, bool lockHistory=false, WebCore::FrameLoadType newLoadType=FrameLoadTypeRedirectWithLockedBackForwardList, WTF::PassRefPtr<WebCore::Event> event={...}, WTF::PassRefPtr<WebCore::FormState> prpFormState={...})  Line 1354	C++
 	WebKit.dll!WebCore::FrameLoader::loadFrameRequest(const WebCore::FrameLoadRequest & request={...}, bool lockHistory=false, bool lockBackForwardList=true, WTF::PassRefPtr<WebCore::Event> event={...}, WTF::PassRefPtr<WebCore::FormState> formState={...}, WebCore::ReferrerPolicy referrerPolicy=SendReferrer)  Line 1293	C++
 	WebKit.dll!WebCore::FrameLoader::urlSelected(const WebCore::ResourceRequest & request={...}, const WTF::String & passedTarget={...}, WTF::PassRefPtr<WebCore::Event> triggeringEvent={...}, bool lockHistory=false, bool lockBackForwardList=true, bool userGesture=false, WebCore::ReferrerPolicy referrerPolicy=SendReferrer, WebCore::ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL=ReplaceDocumentIfJavaScriptURL)  Line 304	C++
 	WebKit.dll!WebCore::FrameLoader::changeLocation(const WebCore::KURL & url={...}, const WTF::String & referrer={...}, bool lockHistory=false, bool lockBackForwardList=true, bool userGesture=false, bool refresh=false)  Line 273 + 0x40 bytes	C++
>	WebKit.dll!WebCore::ScheduledURLNavigation::fire(WebCore::Frame * frame=0x046640e0)  Line 98 + 0x43 bytes	C++
 	WebKit.dll!WebCore::RedirectScheduler::timerFired(WebCore::Timer<WebCore::RedirectScheduler> * __formal=0x04664390)  Line 360 + 0x20 bytes	C++
 	WebKit.dll!WebCore::Timer<WebCore::RedirectScheduler>::fired()  Line 98 + 0x23 bytes	C++
 	WebKit.dll!WebCore::ThreadTimers::sharedTimerFiredInternal()  Line 112 + 0xf bytes	C++

This doesn't seem synchronous.
Comment 4 Adam Roben (:aroben) 2010-09-10 12:27:10 PDT
I guess about:blank only loads synchronously for new frames. I still wonder how this works on Mac.
Comment 5 Simon Fraser (smfr) 2010-09-10 12:38:09 PDT
Comment on attachment 67215 [details]

The test is wrong; I'll come up with a better one.
Comment 6 Simon Fraser (smfr) 2010-09-10 14:17:45 PDT
Created attachment 67237 [details]
Comment 7 Adam Roben (:aroben) 2010-09-10 14:20:46 PDT
Comment on attachment 67237 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=67237&action=prettypatch

> LayoutTests/compositing/iframes/iframe-src-change.html:52
> +                        results.innerText = "FAIL: should have initially had layers, and did not."
I would say "but did not"

Comment 8 Simon Fraser (smfr) 2010-09-10 14:24:11 PDT