diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 22:06:14 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 22:06:14 +0000 |
commit | 051236f654c97138dd90a81c84e2b4dcaeb29918 (patch) | |
tree | ba065c97767f081d19f804d3a196b3ebba5d0609 /chrome_frame/test/test_with_web_server.cc | |
parent | 507c71074588f718be1808bc0ffe51f3733f6eb7 (diff) | |
download | chromium_src-051236f654c97138dd90a81c84e2b4dcaeb29918.zip chromium_src-051236f654c97138dd90a81c84e2b4dcaeb29918.tar.gz chromium_src-051236f654c97138dd90a81c84e2b4dcaeb29918.tar.bz2 |
Fix #1 for multiple request issue (both POST and GET) after activating the onhttpequiv approach.
There's a ton going on here. Brief summary: I'm introducing a caching layer for top level page requests that we then use again when switching the document from mshtml to cf.
Also in this change list:
* Removing the previous way of shifting the document moniker
over to the worker thread when a new chrome document is
created. Instead we use a request cache object.
* Refactoring the part of the Bho class that offered access
to it via TLS. This was needed for better testability but
also makes (imho) the separation clearer and will possibly
help in the future if we don't have a Bho object.
* Added a bit of logging that I'd prefer to keep in there until we're confident enough with onhttpequiv.
* Enabling two previously disabled tests (the ones I added for multiple requests)
* Adding several more unit tests for the new code.
Review URL: http://codereview.chromium.org/668187
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/test_with_web_server.cc')
-rw-r--r-- | chrome_frame/test/test_with_web_server.cc | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index 52d32dd..ec5d541 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -693,9 +693,17 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_NavigateOut) { const wchar_t kReferrerMainTest[] = L"files/referrer_main.html"; -// Marking as FLAKY as this intermittently fails on the builder. -// http://code.google.com/p/chromium/issues/detail?id=34812 -TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_ReferrerTest) { +TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_ReferrerTest) { + // At the moment the moniker patch is only enabled if the below + // registry config value is set to PATCH_METHOD_IBROWSER_AND_MONIKER. + ProtocolPatchMethod patch_method = + static_cast<ProtocolPatchMethod>( + GetConfigInt(PATCH_METHOD_IBROWSER, kPatchProtocols)); + if (patch_method != PATCH_METHOD_IBROWSER_AND_MONIKER) { + DLOG(ERROR) << "Not running test. Moniker patch not enabled."; + return; + } + SimpleBrowserTest(IE, kReferrerMainTest, L"FullTab_ReferrerTest"); } @@ -779,12 +787,18 @@ TEST_F(ChromeFrameTestWithWebServer, ASSERT_TRUE(CheckResultFile(L"FullTab_AnchorURLNavigateTest", "OK")); } -// DISABLED as it currently fails for both approaches for switching -// renderers (httpequiv and IInternetProtocol). -// TODO(tommi): Enable this test once the issue has been fixed. -TEST_F(ChromeFrameTestWithWebServer, DISABLED_FullTabModeIE_TestPostReissue) { - // Test whether POST-ing a form from an mshtml page to a CF page will cause - // the request to get reissued. It should not. +// Test whether POST-ing a form from an mshtml page to a CF page will cause +// the request to get reissued. It should not. +TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_TestPostReissue) { + // At the moment the moniker patch is only enabled if the below + // registry config value is set to PATCH_METHOD_IBROWSER_AND_MONIKER. + ProtocolPatchMethod patch_method = + static_cast<ProtocolPatchMethod>( + GetConfigInt(PATCH_METHOD_IBROWSER, kPatchProtocols)); + if (patch_method != PATCH_METHOD_IBROWSER_AND_MONIKER) { + DLOG(ERROR) << "Not running test. Moniker patch not enabled."; + return; + } MessageLoopForUI loop; // must come before the server. @@ -814,12 +828,18 @@ TEST_F(ChromeFrameTestWithWebServer, DISABLED_FullTabModeIE_TestPostReissue) { } } -// DISABLED as it currently fails for both approaches for switching -// renderers (httpequiv and IInternetProtocol). -// TODO(tommi): Enable this test once the issue has been fixed. -TEST_F(ChromeFrameTestWithWebServer, DISABLED_FullTabModeIE_TestMultipleGet) { - // Test whether following a link from an mshtml page to a CF page will cause - // multiple network requests. It should not. +// Test whether following a link from an mshtml page to a CF page will cause +// multiple network requests. It should not. +TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_TestMultipleGet) { + // At the moment the moniker patch is only enabled if the below + // registry config value is set to PATCH_METHOD_IBROWSER_AND_MONIKER. + ProtocolPatchMethod patch_method = + static_cast<ProtocolPatchMethod>( + GetConfigInt(PATCH_METHOD_IBROWSER, kPatchProtocols)); + if (patch_method != PATCH_METHOD_IBROWSER_AND_MONIKER) { + DLOG(ERROR) << "Not running test. Moniker patch not enabled."; + return; + } MessageLoopForUI loop; // must come before the server. |