| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/automation_client_mock.h" | 5 #include "chrome_frame/test/automation_client_mock.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "chrome/common/automation_messages.h" | 9 #include "chrome/common/automation_messages.h" |
| 10 #include "chrome_frame/custom_sync_call_context.h" | 10 #include "chrome_frame/custom_sync_call_context.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // ChromeFrameAutomationClient tests that launch Chrome. | 105 // ChromeFrameAutomationClient tests that launch Chrome. |
| 106 class CFACWithChrome : public testing::Test { | 106 class CFACWithChrome : public testing::Test { |
| 107 protected: | 107 protected: |
| 108 static void SetUpTestCase(); | 108 static void SetUpTestCase(); |
| 109 static void TearDownTestCase(); | 109 static void TearDownTestCase(); |
| 110 | 110 |
| 111 virtual void SetUp() OVERRIDE; | 111 virtual void SetUp() OVERRIDE; |
| 112 virtual void TearDown() OVERRIDE; | 112 virtual void TearDown() OVERRIDE; |
| 113 | 113 |
| 114 static FilePath profile_path_; | 114 static base::FilePath profile_path_; |
| 115 MockCFDelegate cfd_; | 115 MockCFDelegate cfd_; |
| 116 scoped_refptr<ChromeFrameAutomationClient> client_; | 116 scoped_refptr<ChromeFrameAutomationClient> client_; |
| 117 scoped_refptr<ChromeFrameLaunchParams> launch_params_; | 117 scoped_refptr<ChromeFrameLaunchParams> launch_params_; |
| 118 chrome_frame_test::TimedMsgLoop loop_; | 118 chrome_frame_test::TimedMsgLoop loop_; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 // static | 121 // static |
| 122 FilePath CFACWithChrome::profile_path_; | 122 base::FilePath CFACWithChrome::profile_path_; |
| 123 | 123 |
| 124 // static | 124 // static |
| 125 void CFACWithChrome::SetUpTestCase() { | 125 void CFACWithChrome::SetUpTestCase() { |
| 126 GetChromeFrameProfilePath(L"Adam.N.Epilinter", &profile_path_); | 126 GetChromeFrameProfilePath(L"Adam.N.Epilinter", &profile_path_); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // static | 129 // static |
| 130 void CFACWithChrome::TearDownTestCase() { | 130 void CFACWithChrome::TearDownTestCase() { |
| 131 profile_path_.clear(); | 131 profile_path_.clear(); |
| 132 } | 132 } |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 GURL("http://www.nonexistent.com"), empty, profile_path_, | 465 GURL("http://www.nonexistent.com"), empty, profile_path_, |
| 466 profile_path_.BaseName().value(), L"", false, false, false, false)); | 466 profile_path_.BaseName().value(), L"", false, false, false, false)); |
| 467 launch_params->set_launch_timeout(timeout); | 467 launch_params->set_launch_timeout(timeout); |
| 468 launch_params->set_version_check(false); | 468 launch_params->set_version_check(false); |
| 469 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); | 469 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); |
| 470 loop_.RunFor(base::TimeDelta::FromSeconds(10)); | 470 loop_.RunFor(base::TimeDelta::FromSeconds(10)); |
| 471 | 471 |
| 472 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); | 472 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); |
| 473 client_->Uninitialize(); | 473 client_->Uninitialize(); |
| 474 } | 474 } |
| OLD | NEW |