| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 void ChromeFrameTestWithWebServer::SimpleBrowserTest(BrowserKind browser, | 217 void ChromeFrameTestWithWebServer::SimpleBrowserTest(BrowserKind browser, |
| 218 const wchar_t* page) { | 218 const wchar_t* page) { |
| 219 SimpleBrowserTestExpectedResult(browser, page, "OK"); | 219 SimpleBrowserTestExpectedResult(browser, page, "OK"); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser, | 222 void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser, |
| 223 const wchar_t* page) { | 223 const wchar_t* page) { |
| 224 FilePath plugin_path; | 224 FilePath plugin_path; |
| 225 PathService::Get(base::DIR_MODULE, &plugin_path); | 225 PathService::Get(base::DIR_MODULE, &plugin_path); |
| 226 plugin_path = plugin_path.AppendASCII("servers"); | |
| 227 plugin_path = plugin_path.Append(kChromeFrameDllName); | 226 plugin_path = plugin_path.Append(kChromeFrameDllName); |
| 228 | 227 |
| 229 static FileVersionInfo* version_info = | 228 static FileVersionInfo* version_info = |
| 230 FileVersionInfo::CreateFileVersionInfo(plugin_path); | 229 FileVersionInfo::CreateFileVersionInfo(plugin_path); |
| 231 | 230 |
| 232 std::wstring version; | 231 std::wstring version; |
| 233 if (version_info) | 232 if (version_info) |
| 234 version = version_info->product_version(); | 233 version = version_info->product_version(); |
| 235 | 234 |
| 236 // If we can't find the Chrome Frame DLL in the src tree, we turn to | 235 // If we can't find the Chrome Frame DLL in the src tree, we turn to |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 server.web_server()->AddResponse(response); | 1002 server.web_server()->AddResponse(response); |
| 1004 | 1003 |
| 1005 std::wstring url(server.FormatHttpPath(L"form.html")); | 1004 std::wstring url(server.FormatHttpPath(L"form.html")); |
| 1006 | 1005 |
| 1007 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); | 1006 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); |
| 1008 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); | 1007 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); |
| 1009 | 1008 |
| 1010 EXPECT_EQ(1, response->get_request_count()); | 1009 EXPECT_EQ(1, response->get_request_count()); |
| 1011 EXPECT_EQ(1, response->post_request_count()); | 1010 EXPECT_EQ(1, response->post_request_count()); |
| 1012 } | 1011 } |
| OLD | NEW |