Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5958)

Unified Diff: chrome_frame/test/automation_client_mock.cc

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/test/automation_client_mock.h ('k') | chrome_frame/test/chrome_frame_automation_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/automation_client_mock.cc
diff --git a/chrome_frame/test/automation_client_mock.cc b/chrome_frame/test/automation_client_mock.cc
deleted file mode 100644
index 05123364db8ce66c955318baec6163f35b1e68a3..0000000000000000000000000000000000000000
--- a/chrome_frame/test/automation_client_mock.cc
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome_frame/test/automation_client_mock.h"
-
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "chrome/common/automation_messages.h"
-#include "chrome_frame/custom_sync_call_context.h"
-#include "chrome_frame/navigation_constraints.h"
-#include "chrome_frame/test/chrome_frame_test_utils.h"
-#include "chrome_frame/test/test_scrubber.h"
-#include "net/base/net_errors.h"
-
-#define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
-#include "testing/gmock_mutant.h"
-
-using testing::_;
-using testing::CreateFunctor;
-using testing::Return;
-
-namespace {
-
-#ifndef NDEBUG
-const base::TimeDelta kChromeLaunchTimeout = base::TimeDelta::FromSeconds(15);
-#else
-const base::TimeDelta kChromeLaunchTimeout = base::TimeDelta::FromSeconds(10);
-#endif
-
-const int kSaneAutomationTimeoutMs = 10 * 1000;
-
-} // namespace
-
-MATCHER_P(LaunchParamProfileEq, profile_name, "Check for profile name") {
- return arg->profile_name().compare(profile_name) == 0;
-}
-
-void MockProxyFactory::GetServerImpl(ChromeFrameAutomationProxy* pxy,
- void* proxy_id,
- AutomationLaunchResult result,
- LaunchDelegate* d,
- ChromeFrameLaunchParams* params,
- void** automation_server_id) {
- *automation_server_id = proxy_id;
- loop_->PostDelayedTask(FROM_HERE,
- base::Bind(&LaunchDelegate::LaunchComplete,
- base::Unretained(d), pxy, result),
- base::TimeDelta::FromMilliseconds(params->launch_timeout()) / 2);
-}
-
-MATCHER_P(MsgType, msg_type, "IPC::Message::type()") {
- const IPC::Message& m = arg;
- return (m.type() == msg_type);
-}
-
-MATCHER_P(EqNavigationInfoUrl, url, "IPC::NavigationInfo matcher") {
- if (url.is_valid() && url != arg.url)
- return false;
- // TODO(stevet): other members
- return true;
-}
-
-// Could be implemented as MockAutomationProxy member (we have WithArgs<>!)
-ACTION_P4(HandleCreateTab, tab_handle, external_tab_container, tab_wnd,
- session_id) {
- // arg0 - message
- // arg1 - callback
- // arg2 - key
- CreateExternalTabContext::output_type input_args(tab_wnd,
- external_tab_container,
- tab_handle,
- session_id);
- CreateExternalTabContext* context =
- reinterpret_cast<CreateExternalTabContext*>(arg1);
- DispatchToMethod(context, &CreateExternalTabContext::Completed, input_args);
- delete context;
-}
-
-ACTION_P4(InitiateNavigation, client, url, referrer, constraints) {
- client->InitiateNavigation(url, referrer, constraints);
-}
-
-// ChromeFrameAutomationClient tests that launch Chrome.
-class CFACWithChrome : public testing::Test {
- protected:
- static void SetUpTestCase();
- static void TearDownTestCase();
-
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
-
- static base::FilePath profile_path_;
- scoped_refptr<ChromeFrameAutomationClient> client_;
- scoped_refptr<ChromeFrameLaunchParams> launch_params_;
- chrome_frame_test::TimedMsgLoop loop_;
-};
-
-// static
-base::FilePath CFACWithChrome::profile_path_;
-
-// static
-void CFACWithChrome::SetUpTestCase() {
- GetChromeFrameProfilePath(L"Adam.N.Epilinter", &profile_path_);
-}
-
-// static
-void CFACWithChrome::TearDownTestCase() {
- profile_path_.clear();
-}
-
-void CFACWithChrome::SetUp() {
- chrome_frame_test::OverrideDataDirectoryForThisTest(profile_path_.value());
- client_ = new ChromeFrameAutomationClient();
- GURL empty;
- launch_params_ = new ChromeFrameLaunchParams(
- empty, empty, profile_path_, profile_path_.BaseName().value(), L"",
- false, false, false);
- launch_params_->set_version_check(false);
- launch_params_->set_launch_timeout(kSaneAutomationTimeoutMs);
-}
-
-void CFACWithChrome::TearDown() {
- client_->Uninitialize();
-}
« no previous file with comments | « chrome_frame/test/automation_client_mock.h ('k') | chrome_frame/test/chrome_frame_automation_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698