diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 23:45:15 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 23:45:15 +0000 |
commit | 58611c0e9426c0fa30465102ef5436fca7ed439d (patch) | |
tree | 2946b81ba0a8fefc8d78fb4f631bf562ff8e20d1 /chrome_frame/test | |
parent | ac0aafe4dae9ef8111e5cf31ebafa19190f138f5 (diff) | |
download | chromium_src-58611c0e9426c0fa30465102ef5436fca7ed439d.zip chromium_src-58611c0e9426c0fa30465102ef5436fca7ed439d.tar.gz chromium_src-58611c0e9426c0fa30465102ef5436fca7ed439d.tar.bz2 |
Fix the NavigationToRestrictedSite ChromeFrame test to work with the new ChromeFrame internet protocol
patch. Basically the change is to add an additional BeforeNavigate2 expectation for the error page.
Review URL: http://codereview.chromium.org/2842012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/test_mock_with_web_server.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome_frame/test/test_mock_with_web_server.cc b/chrome_frame/test/test_mock_with_web_server.cc index bdd5c8d..e2e6a1ef 100644 --- a/chrome_frame/test/test_mock_with_web_server.cc +++ b/chrome_frame/test/test_mock_with_web_server.cc @@ -1309,15 +1309,25 @@ TEST(IEPrivacy, NavigationToRestrictedSite) { EXPECT_CALL(mock, OnFileDownload(_, _)) .Times(testing::AnyNumber()); - testing::InSequence s; + ProtocolPatchMethod patch_method = GetPatchMethod(); + + //testing::InSequence s; const wchar_t* url = L"http://localhost:1337/files/meta_tag.html"; const wchar_t* kDialogClass = L"#32770"; + EXPECT_CALL(mock, OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal, testing::StrCaseEq(url)), _, _, _, _, _)) .Times(1) .WillOnce(WatchWindow(&mock, kDialogClass)); + if (patch_method == PATCH_METHOD_INET_PROTOCOL) { + EXPECT_CALL(mock, OnBeforeNavigate2(_, + testing::Field(&VARIANT::bstrVal, + testing::HasSubstr(L"res://")), _, _, _, _, _)) + .Times(1); + } + EXPECT_CALL(mock, OnNavigateComplete2(_, testing::Field(&VARIANT::bstrVal, testing::StrCaseEq(url)))).Times(1); |