| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #include <windows.h> | 4 #include <windows.h> |
| 5 #include <stdarg.h> | 5 #include <stdarg.h> |
| 6 | 6 |
| 7 // IShellWindows includes. Unfortunately we can't keep these in | 7 // IShellWindows includes. Unfortunately we can't keep these in |
| 8 // alphabetic order since exdisp will bark if some interfaces aren't fully | 8 // alphabetic order since exdisp will bark if some interfaces aren't fully |
| 9 // defined. | 9 // defined. |
| 10 #include <mshtml.h> | 10 #include <mshtml.h> |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 const std::wstring profile = L"Adam.N.Epilinter"; | 1094 const std::wstring profile = L"Adam.N.Epilinter"; |
| 1095 const std::string url = "about:version"; | 1095 const std::string url = "about:version"; |
| 1096 int timeout = 10000; | 1096 int timeout = 10000; |
| 1097 | 1097 |
| 1098 scoped_ptr<ChromeFrameAutomationClient> client; | 1098 scoped_ptr<ChromeFrameAutomationClient> client; |
| 1099 client.reset(new ChromeFrameAutomationClient); | 1099 client.reset(new ChromeFrameAutomationClient); |
| 1100 | 1100 |
| 1101 EXPECT_CALL(cfd, OnAutomationServerReady()) | 1101 EXPECT_CALL(cfd, OnAutomationServerReady()) |
| 1102 .WillOnce(testing::InvokeWithoutArgs(TaskHolder(NewRunnableMethod( | 1102 .WillOnce(testing::InvokeWithoutArgs(TaskHolder(NewRunnableMethod( |
| 1103 client.get(), &ChromeFrameAutomationClient::InitiateNavigation, | 1103 client.get(), &ChromeFrameAutomationClient::InitiateNavigation, |
| 1104 url, false)))); | 1104 url, std::string(), false)))); |
| 1105 | 1105 |
| 1106 // cfd.SetOnNavigationStateChanged(); | 1106 // cfd.SetOnNavigationStateChanged(); |
| 1107 EXPECT_CALL(cfd, | 1107 EXPECT_CALL(cfd, |
| 1108 OnNavigationStateChanged(testing::_, testing::_)) | 1108 OnNavigationStateChanged(testing::_, testing::_)) |
| 1109 .Times(testing::AnyNumber()); | 1109 .Times(testing::AnyNumber()); |
| 1110 | 1110 |
| 1111 { | 1111 { |
| 1112 testing::InSequence s; | 1112 testing::InSequence s; |
| 1113 | 1113 |
| 1114 EXPECT_CALL(cfd, OnDidNavigate(testing::_, EqNavigationInfoUrl(GURL()))) | 1114 EXPECT_CALL(cfd, OnDidNavigate(testing::_, EqNavigationInfoUrl(GURL()))) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1134 const std::wstring profile = L"Adam.N.Epilinter"; | 1134 const std::wstring profile = L"Adam.N.Epilinter"; |
| 1135 const std::string url = "http://127.0.0.3:65412/"; | 1135 const std::string url = "http://127.0.0.3:65412/"; |
| 1136 int timeout = 10000; | 1136 int timeout = 10000; |
| 1137 | 1137 |
| 1138 scoped_ptr<ChromeFrameAutomationClient> client; | 1138 scoped_ptr<ChromeFrameAutomationClient> client; |
| 1139 client.reset(new ChromeFrameAutomationClient); | 1139 client.reset(new ChromeFrameAutomationClient); |
| 1140 | 1140 |
| 1141 EXPECT_CALL(cfd, OnAutomationServerReady()) | 1141 EXPECT_CALL(cfd, OnAutomationServerReady()) |
| 1142 .WillOnce(testing::InvokeWithoutArgs(TaskHolder(NewRunnableMethod( | 1142 .WillOnce(testing::InvokeWithoutArgs(TaskHolder(NewRunnableMethod( |
| 1143 client.get(), &ChromeFrameAutomationClient::InitiateNavigation, | 1143 client.get(), &ChromeFrameAutomationClient::InitiateNavigation, |
| 1144 url, false)))); | 1144 url, std::string(), false)))); |
| 1145 | 1145 |
| 1146 EXPECT_CALL(cfd, | 1146 EXPECT_CALL(cfd, |
| 1147 OnNavigationStateChanged(testing::_, testing::_)) | 1147 OnNavigationStateChanged(testing::_, testing::_)) |
| 1148 .Times(testing::AnyNumber()); | 1148 .Times(testing::AnyNumber()); |
| 1149 | 1149 |
| 1150 EXPECT_CALL(cfd, OnNavigationFailed(testing::_, testing::_, testing::_)) | 1150 EXPECT_CALL(cfd, OnNavigationFailed(testing::_, testing::_, testing::_)) |
| 1151 .Times(1); | 1151 .Times(1); |
| 1152 | 1152 |
| 1153 EXPECT_CALL(cfd, OnUpdateTargetUrl(testing::_, testing::_)) | 1153 EXPECT_CALL(cfd, OnUpdateTargetUrl(testing::_, testing::_)) |
| 1154 .Times(testing::AnyNumber()); | 1154 .Times(testing::AnyNumber()); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 int timeout = 10000; | 1192 int timeout = 10000; |
| 1193 | 1193 |
| 1194 scoped_ptr<ChromeFrameAutomationClient> client; | 1194 scoped_ptr<ChromeFrameAutomationClient> client; |
| 1195 client.reset(new ChromeFrameAutomationClient); | 1195 client.reset(new ChromeFrameAutomationClient); |
| 1196 client->set_use_chrome_network(false); | 1196 client->set_use_chrome_network(false); |
| 1197 cfd.SetAutomationSender(client.get()); | 1197 cfd.SetAutomationSender(client.get()); |
| 1198 | 1198 |
| 1199 EXPECT_CALL(cfd, OnAutomationServerReady()) | 1199 EXPECT_CALL(cfd, OnAutomationServerReady()) |
| 1200 .WillOnce(testing::InvokeWithoutArgs(TaskHolder(NewRunnableMethod( | 1200 .WillOnce(testing::InvokeWithoutArgs(TaskHolder(NewRunnableMethod( |
| 1201 client.get(), &ChromeFrameAutomationClient::InitiateNavigation, | 1201 client.get(), &ChromeFrameAutomationClient::InitiateNavigation, |
| 1202 url, false)))); | 1202 url, std::string(), false)))); |
| 1203 | 1203 |
| 1204 EXPECT_CALL(cfd, OnNavigationStateChanged(testing::_, testing::_)) | 1204 EXPECT_CALL(cfd, OnNavigationStateChanged(testing::_, testing::_)) |
| 1205 .Times(testing::AnyNumber()); | 1205 .Times(testing::AnyNumber()); |
| 1206 | 1206 |
| 1207 EXPECT_CALL(cfd, GetBounds(testing::_)) | 1207 EXPECT_CALL(cfd, GetBounds(testing::_)) |
| 1208 .Times(testing::AtMost(1)); | 1208 .Times(testing::AtMost(1)); |
| 1209 | 1209 |
| 1210 EXPECT_CALL(cfd, OnUpdateTargetUrl(testing::_, testing::_)) | 1210 EXPECT_CALL(cfd, OnUpdateTargetUrl(testing::_, testing::_)) |
| 1211 .Times(testing::AnyNumber()); | 1211 .Times(testing::AnyNumber()); |
| 1212 | 1212 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1424 L"files/persistent_cookie_test_page.html"; | 1424 L"files/persistent_cookie_test_page.html"; |
| 1425 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_PersistentCookieTest) { | 1425 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_PersistentCookieTest) { |
| 1426 SimpleBrowserTest(IE, kPersistentCookieTest, L"PersistentCookieTest"); | 1426 SimpleBrowserTest(IE, kPersistentCookieTest, L"PersistentCookieTest"); |
| 1427 } | 1427 } |
| 1428 | 1428 |
| 1429 const wchar_t kNavigateOutPage[] = L"files/navigate_out.html"; | 1429 const wchar_t kNavigateOutPage[] = L"files/navigate_out.html"; |
| 1430 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_NavigateOut) { | 1430 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_NavigateOut) { |
| 1431 SimpleBrowserTest(IE, kNavigateOutPage, L"navigate_out"); | 1431 SimpleBrowserTest(IE, kNavigateOutPage, L"navigate_out"); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 const wchar_t kReferrerMainTest[] = L"files/referrer_main.html"; |
| 1435 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_ReferrerTest) { |
| 1436 SimpleBrowserTest(IE, kReferrerMainTest, L"FullTab_ReferrerTest"); |
| 1437 } |
| 1438 |
| 1434 HRESULT LaunchIEAsComServer(IWebBrowser2** web_browser) { | 1439 HRESULT LaunchIEAsComServer(IWebBrowser2** web_browser) { |
| 1435 if (!web_browser) | 1440 if (!web_browser) |
| 1436 return E_INVALIDARG; | 1441 return E_INVALIDARG; |
| 1437 | 1442 |
| 1438 ScopedComPtr<IWebBrowser2> web_browser2; | 1443 ScopedComPtr<IWebBrowser2> web_browser2; |
| 1439 HRESULT hr = CoCreateInstance( | 1444 HRESULT hr = CoCreateInstance( |
| 1440 CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, | 1445 CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, |
| 1441 reinterpret_cast<void**>(web_browser2.Receive())); | 1446 reinterpret_cast<void**>(web_browser2.Receive())); |
| 1442 | 1447 |
| 1443 if (SUCCEEDED(hr)) { | 1448 if (SUCCEEDED(hr)) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1501 EXPECT_TRUE(hr == S_OK); | 1506 EXPECT_TRUE(hr == S_OK); |
| 1502 | 1507 |
| 1503 web_browser2.Release(); | 1508 web_browser2.Release(); |
| 1504 chrome_frame_test::CloseAllIEWindows(); | 1509 chrome_frame_test::CloseAllIEWindows(); |
| 1505 | 1510 |
| 1506 if (should_uninit) { | 1511 if (should_uninit) { |
| 1507 CoUninitialize(); | 1512 CoUninitialize(); |
| 1508 } | 1513 } |
| 1509 } | 1514 } |
| 1510 | 1515 |
| OLD | NEW |