| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_AUTOMATION_MOCK_H_ | 4 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_AUTOMATION_MOCK_H_ |
| 5 #define CHROME_FRAME_TEST_CHROME_FRAME_AUTOMATION_MOCK_H_ | 5 #define CHROME_FRAME_TEST_CHROME_FRAME_AUTOMATION_MOCK_H_ |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 if (IsWindow()) | 35 if (IsWindow()) |
| 36 DestroyWindow(); | 36 DestroyWindow(); |
| 37 | 37 |
| 38 test_server_.TearDown(); | 38 test_server_.TearDown(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // Navigate external tab to the specified url through automation | 41 // Navigate external tab to the specified url through automation |
| 42 bool Navigate(const std::string& url) { | 42 bool Navigate(const std::string& url) { |
| 43 url_ = GURL(url); | 43 url_ = GURL(url); |
| 44 return automation_client_->InitiateNavigation(url, false); | 44 return automation_client_->InitiateNavigation(url, std::string(), false); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // Navigate the external to a 'file://' url for unit test files | 47 // Navigate the external to a 'file://' url for unit test files |
| 48 bool NavigateRelativeFile(const std::wstring& file) { | 48 bool NavigateRelativeFile(const std::wstring& file) { |
| 49 FilePath cf_source_path; | 49 FilePath cf_source_path; |
| 50 PathService::Get(base::DIR_SOURCE_ROOT, &cf_source_path); | 50 PathService::Get(base::DIR_SOURCE_ROOT, &cf_source_path); |
| 51 std::wstring file_url(L"file://"); | 51 std::wstring file_url(L"file://"); |
| 52 file_url.append(cf_source_path.Append( | 52 file_url.append(cf_source_path.Append( |
| 53 FILE_PATH_LITERAL("chrome_frame")).Append( | 53 FILE_PATH_LITERAL("chrome_frame")).Append( |
| 54 FILE_PATH_LITERAL("test")).Append( | 54 FILE_PATH_LITERAL("test")).Append( |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 virtual void OnLoad(int tab_handle, const GURL& url) { | 199 virtual void OnLoad(int tab_handle, const GURL& url) { |
| 200 Base::OnLoad(tab_handle, url); | 200 Base::OnLoad(tab_handle, url); |
| 201 } | 201 } |
| 202 private: | 202 private: |
| 203 bool request_start_result_; | 203 bool request_start_result_; |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 | 206 |
| 207 #endif // CHROME_FRAME_TEST_CHROME_FRAME_AUTOMATION_MOCK_H_ | 207 #endif // CHROME_FRAME_TEST_CHROME_FRAME_AUTOMATION_MOCK_H_ |
| 208 | 208 |
| OLD | NEW |