summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 00:44:24 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 00:44:24 +0000
commit94a3fbfa2fb5da363960d538938e4887e52d1345 (patch)
tree4bbd8cf3cde06ec7ed0b3c2b0d28e611bec76716 /chrome_frame
parent4c408fdba489ac7d42c0bf0128a6df832eec307d (diff)
downloadchromium_src-94a3fbfa2fb5da363960d538938e4887e52d1345.zip
chromium_src-94a3fbfa2fb5da363960d538938e4887e52d1345.tar.gz
chromium_src-94a3fbfa2fb5da363960d538938e4887e52d1345.tar.bz2
Disabling onhttpequiv again due to page reload issues.
TEST=Make sure unit tests still pass. BUG=33332 Review URL: http://codereview.chromium.org/555178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/bho.cc2
-rw-r--r--chrome_frame/test/chrome_frame_unittests.cc48
-rw-r--r--chrome_frame/utils.cc5
3 files changed, 36 insertions, 19 deletions
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc
index 96ac78c..ec6942a 100644
--- a/chrome_frame/bho.cc
+++ b/chrome_frame/bho.cc
@@ -353,7 +353,7 @@ bool PatchHelper::InitializeAndPatchProtocolsIfNeeded() {
HttpNegotiatePatch::Initialize();
- bool patch_protocol = GetConfigBool(false, kPatchProtocols);
+ bool patch_protocol = GetConfigBool(true, kPatchProtocols);
if (patch_protocol) {
ProtocolSinkWrap::PatchProtocolHandlers();
state_ = PATCH_PROTOCOL;
diff --git a/chrome_frame/test/chrome_frame_unittests.cc b/chrome_frame/test/chrome_frame_unittests.cc
index 6e9cf27..875b30b 100644
--- a/chrome_frame/test/chrome_frame_unittests.cc
+++ b/chrome_frame/test/chrome_frame_unittests.cc
@@ -247,6 +247,12 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabIE_MIMEFilterBasic) {
const wchar_t kMIMEFilterBasicPage[] =
L"files/chrome_frame_mime_filter_test.html";
+ // If this test fails for IE8 then it is possible that prebinding is enabled.
+ // A known workaround is to disable it until CF properly handles it.
+ //
+ // HKCU\Software\Microsoft\Internet Explorer\Main
+ // Value name: EnablePreBinding (REG_DWORD)
+ // Value: 0
SimpleBrowserTest(IE, kMIMEFilterBasicPage, L"MIMEFilter");
}
@@ -1331,9 +1337,9 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_WindowOpenInChrome) {
_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kChromeFrameFullTabWindowOpenTestUrl)),
_, _, _, _, _))
- .WillOnce(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillOnce(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .WillOnce(testing::Return());
+ .Times(testing::AnyNumber()).WillOnce(testing::Return());
EXPECT_CALL(mock,
OnLoad(testing::StrEq(kChromeFrameFullTabWindowOpenTestUrl)))
@@ -1389,9 +1395,9 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_AboutChromeFrame) {
OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kSubFrameUrl1)),
_, _, _, _, _))
- .Times(2).WillRepeatedly(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillRepeatedly(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .Times(2).WillRepeatedly(testing::Return());
+ .Times(testing::AnyNumber()).WillRepeatedly(testing::Return());
EXPECT_CALL(mock, OnLoad(testing::StrEq(kSubFrameUrl1)))
.WillOnce(testing::InvokeWithoutArgs(
@@ -1460,7 +1466,8 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_BackForward) {
CComObjectStackEx<MockWebBrowserEventSink> mock;
::testing::InSequence sequence; // Everything in sequence
- // We will get two BeforeNavigate2/OnNavigateComplete2 notifications due to
+ // When the onhttpequiv patch is enabled, we will get two
+ // BeforeNavigate2/OnNavigateComplete2 notifications due to
// switching from IE to CF.
// Note that when going backwards, we don't expect that since the extra
// navigational entries in the travel log should have been removed.
@@ -1478,10 +1485,10 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_BackForward) {
OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kSubFrameUrl1)),
_, _, _, _, _))
- .WillOnce(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillOnce(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .WillOnce(testing::Return());
+ .Times(testing::AnyNumber()).WillOnce(testing::Return());
// Navigate to url 2 after the previous navigation is complete.
EXPECT_CALL(mock, OnLoad(testing::StrEq(kSubFrameUrl1)))
@@ -1504,10 +1511,10 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_BackForward) {
OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kSubFrameUrl2)),
_, _, _, _, _))
- .WillOnce(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillOnce(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .WillOnce(testing::Return());
+ .Times(testing::AnyNumber()).WillOnce(testing::Return());
// Navigate to url 3 after the previous navigation is complete
EXPECT_CALL(mock, OnLoad(testing::StrEq(kSubFrameUrl2)))
@@ -1531,10 +1538,10 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_BackForward) {
OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kSubFrameUrl3)),
_, _, _, _, _))
- .WillOnce(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillOnce(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .WillOnce(testing::Return());
+ .Times(testing::AnyNumber()).WillOnce(testing::Return());
// Go back.
EXPECT_CALL(mock, OnLoad(testing::StrEq(kSubFrameUrl3)))
@@ -1630,7 +1637,8 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_BackForwardAnchor) {
CComObjectStackEx<MockWebBrowserEventSink> mock;
::testing::InSequence sequence; // Everything in sequence
- // We will get two BeforeNavigate2/OnNavigateComplete2 notifications due to
+ // When the onhttpequiv patch is enabled, we will get two
+ // BeforeNavigate2/OnNavigateComplete2 notifications due to
// switching from IE to CF.
// Note that when going backwards, we don't expect that since the extra
// navigational entries in the travel log should have been removed.
@@ -1648,9 +1656,9 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_BackForwardAnchor) {
EXPECT_CALL(mock, OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kAnchorUrl)),
_, _, _, _, _))
- .WillOnce(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillOnce(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .WillOnce(testing::Return());
+ .Times(testing::AnyNumber()).WillOnce(testing::Return());
// Navigate to anchor 1:
// - First set focus to chrome renderer window
@@ -1909,10 +1917,12 @@ TEST_F(ChromeFrameTestWithWebServer,
_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kChromeFrameFullTabModeBeforeUnloadEventTest)),
_, _, _, _, _))
- .WillOnce(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillOnce(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .WillOnce(testing::Return());
+ .Times(testing::AnyNumber()).WillOnce(testing::Return());
+
+ EXPECT_CALL(mock, OnLoad(_)).WillOnce(testing::Return());
// We will get two BeforeNavigate2/OnNavigateComplete2 notifications due to
// switching from IE to CF.
@@ -1933,10 +1943,12 @@ TEST_F(ChromeFrameTestWithWebServer,
_, testing::Field(&VARIANT::bstrVal,
testing::StrCaseEq(kChromeFrameFullTabModeBeforeUnloadEventMain)),
_, _, _, _, _))
- .WillOnce(testing::Return(S_OK));
+ .Times(testing::AnyNumber()).WillOnce(testing::Return(S_OK));
EXPECT_CALL(mock, OnNavigateComplete2(_, _))
- .WillOnce(testing::Return());
+ .Times(testing::AnyNumber()).WillOnce(testing::Return());
+
+ EXPECT_CALL(mock, OnLoad(_)).WillOnce(testing::Return());
EXPECT_CALL(mock, OnMessage(_))
.WillOnce(testing::DoAll(
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index e0b407b..e6632f9 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -65,6 +65,10 @@ static const IID IID_IWebBrowserPriv2IE8 = { 0x3ED72303, 0x6FFC, 0x4214,
static const IID IID_IWebBrowserPriv2IE8XP = { 0x486F6159, 0x9F3F, 0x4827,
{ 0x82, 0xD4, 0x28, 0x3C, 0xEF, 0x39, 0x77, 0x33 } };
+// {38339692-0BC9-46CB-8E5C-4677A5C83DD5}
+static const IID IID_IWebBrowserPriv2IE8XPBeta = { 0x38339692, 0x0BC9, 0x46CB,
+ { 0x8E, 0x5C, 0x46, 0x77, 0xA5, 0xC8, 0x3D, 0xD5 } };
+
namespace {
// A flag used to signal when an active browser instance on the current thread
@@ -678,6 +682,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
&IID_IWebBrowserPriv2IE7,
&IID_IWebBrowserPriv2IE8,
&IID_IWebBrowserPriv2IE8XP,
+ &IID_IWebBrowserPriv2IE8XPBeta,
};
ScopedComPtr<IWebBrowserPriv2Common, NULL> browser_priv2;