OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 4 |
5 #include "chrome_frame/test/test_with_web_server.h" | 5 #include "chrome_frame/test/test_with_web_server.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "base/win_util.h" | 12 #include "base/win/windows_version.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/installer/util/install_util.h" | 14 #include "chrome/installer/util/install_util.h" |
15 #include "chrome/installer/util/helper.h" | 15 #include "chrome/installer/util/helper.h" |
16 #include "chrome_frame/html_utils.h" | 16 #include "chrome_frame/html_utils.h" |
17 #include "chrome_frame/utils.h" | 17 #include "chrome_frame/utils.h" |
18 #include "chrome_frame/test/chrome_frame_test_utils.h" | 18 #include "chrome_frame/test/chrome_frame_test_utils.h" |
19 #include "chrome_frame/test/mock_ie_event_sink_actions.h" | 19 #include "chrome_frame/test/mock_ie_event_sink_actions.h" |
20 #include "net/base/mime_util.h" | 20 #include "net/base/mime_util.h" |
21 #include "net/http/http_util.h" | 21 #include "net/http/http_util.h" |
22 | 22 |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 L"xmlhttprequest_test.html"; | 861 L"xmlhttprequest_test.html"; |
862 | 862 |
863 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_XHRTest) { | 863 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_XHRTest) { |
864 SimpleBrowserTest(IE, kXMLHttpRequestTestUrl); | 864 SimpleBrowserTest(IE, kXMLHttpRequestTestUrl); |
865 } | 865 } |
866 | 866 |
867 const wchar_t kInstallFlowTestUrl[] = | 867 const wchar_t kInstallFlowTestUrl[] = |
868 L"install_flow_test.html"; | 868 L"install_flow_test.html"; |
869 | 869 |
870 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_InstallFlowTest) { | 870 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_InstallFlowTest) { |
871 if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { | 871 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
872 ScopedChromeFrameRegistrar::UnregisterAtPath( | 872 ScopedChromeFrameRegistrar::UnregisterAtPath( |
873 ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value()); | 873 ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value()); |
874 | 874 |
875 ASSERT_TRUE(LaunchBrowser(IE, kInstallFlowTestUrl)); | 875 ASSERT_TRUE(LaunchBrowser(IE, kInstallFlowTestUrl)); |
876 | 876 |
877 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); | 877 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); |
878 | 878 |
879 ScopedChromeFrameRegistrar::RegisterAtPath( | 879 ScopedChromeFrameRegistrar::RegisterAtPath( |
880 ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value()); | 880 ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value()); |
881 | 881 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 const test_server::Request& r = c->request(); | 1109 const test_server::Request& r = c->request(); |
1110 if (ASCIIToWide(r.path().substr(1)).compare(kPages[0]) == 0) { | 1110 if (ASCIIToWide(r.path().substr(1)).compare(kPages[0]) == 0) { |
1111 requests_for_first_page++; | 1111 requests_for_first_page++; |
1112 std::string ua(GetHeaderValue(r.headers(), "User-Agent")); | 1112 std::string ua(GetHeaderValue(r.headers(), "User-Agent")); |
1113 EXPECT_NE(std::string::npos, ua.find("chromeframe")); | 1113 EXPECT_NE(std::string::npos, ua.find("chromeframe")); |
1114 } | 1114 } |
1115 } | 1115 } |
1116 EXPECT_GT(requests_for_first_page, 1); | 1116 EXPECT_GT(requests_for_first_page, 1); |
1117 } | 1117 } |
1118 | 1118 |
OLD | NEW |