Bug 120105

Summary: http/tests/navigation/post-frames-goback1-uncached.html fails on Qt, GTK+, and EFL bots
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: abrhm, ap, beidson, kadam, ossy, seokju, spenap, zan, zarvai
Priority: P2 Keywords: LayoutTestFailure
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 120028, 120152    
Bug Blocks:    

Comment 1 Alexey Proskuryakov 2013-08-20 23:46:19 PDT
This looks like a difference in UI delegate implementation. If this test is run in a browser, a dialog asking whether it's OK to submit a form again appears. Mac DumpRenderTree simulates a "NO" answer, while the platforms where this fails say "YES".
Comment 2 Ryosuke Niwa 2013-08-20 23:50:09 PDT
Should we simply rebaseline it then?
Comment 3 Alexey Proskuryakov 2013-08-21 09:55:29 PDT
Landing custom results sounds OK for now, but ideally, DumpRenderTree should be changed on these platforms, I think.
Comment 4 Alexey Proskuryakov 2013-08-22 16:27:49 PDT
I was wrong about the reason. DumpRenderTree allows the load, but it doesn't show up because the test finishes before the subframe loads.

Looks like there may be two bugs:

1. WebCore dispatches a load event too early when going back. This happens in FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad() when it calls stopAllLoaders(), but the load is not done yet, it is continued to attempt resubmitting the form!

2. Not quite sure what happens on platforms that fail the current test results. Perhaps they ignore Cache-Control, and cache the result of form submission anyway? Could someone please set a breakpoint in FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad() and see if it's hit?

So, Qt/Gtk/EFL results are what the test should print if not for issue (1), but they are probably like that because of another bug only, not because the right thing happens.
Comment 5 Simon Pena 2013-08-23 01:03:50 PDT
(In reply to comment #4)
> I was wrong about the reason. DumpRenderTree allows the load, but it doesn't show up because the test finishes before the subframe loads.
> 
> Looks like there may be two bugs:
> 
> 1. WebCore dispatches a load event too early when going back. This happens in FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad() when it calls stopAllLoaders(), but the load is not done yet, it is continued to attempt resubmitting the form!
> 
> 2. Not quite sure what happens on platforms that fail the current test results. Perhaps they ignore Cache-Control, and cache the result of form submission anyway? Could someone please set a breakpoint in FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad() and see if it's hit?
> 
> So, Qt/Gtk/EFL results are what the test should print if not for issue (1), but they are probably like that because of another bug only, not because the right thing happens.

Thanks for the insight, Alexey! I will check debug the test and see what happens in retryAfterFailedCacheOnlyMainResourceLoad(). I also should rename the GTK-specific test, but will do that once we know a bit more about what's going on.
Comment 6 Simon Pena 2013-08-23 01:11:14 PDT
I said "GTK-specific test" when I meant "GTK-specific bug". Anyway, it is correctly closed as invalid, and another one could be open if needed.

I set a breakpoint in FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad, but it is not hit in the GTK port.
Comment 7 Simon Pena 2013-08-23 01:24:50 PDT
The GTK port produces the same output in

http/tests/navigation/post-frames-goback1-uncached.html

and 

http/tests/navigation/post-frames-goback1.html

so I imagine this is consistent with your theory that we are ignoring the Cache-Control.