Chromium Code Reviews

Unified Diff: chrome_frame/test/automation_client_mock.cc

Issue 1343002: Re-submit of GCF privacy patch in:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« 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
===================================================================
--- chrome_frame/test/automation_client_mock.cc (revision 42676)
+++ chrome_frame/test/automation_client_mock.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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"
@@ -44,7 +44,7 @@
void CFACMockTest::SetAutomationServerOk() {
EXPECT_CALL(factory_, GetAutomationServer(testing::NotNull(),
testing::Field(&ChromeFrameLaunchParams::profile_name,
- testing::StrEq(profile_)),
+ testing::StrEq(profile_path_.BaseName().ToWStringHack())),
testing::NotNull()))
.Times(1)
.WillOnce(testing::Invoke(CreateFunctor(&factory_,
@@ -91,7 +91,8 @@
MockCFDelegate cfd;
chrome_frame_test::TimedMsgLoop loop;
int timeout = 0; // Chrome cannot send Hello message so fast.
- const std::wstring profile = L"Adam.N.Epilinter";
+ const FilePath profile_path(
+ chrome_frame_test::GetProfilePath(L"Adam.N.Epilinter"));
scoped_refptr<ChromeFrameAutomationClient> client;
client = new ChromeFrameAutomationClient();
@@ -100,7 +101,8 @@
.Times(1)
.WillOnce(QUIT_LOOP(loop));
- EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile, L"", false));
+ EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile_path, L"",
+ false));
loop.RunFor(10);
client->Uninitialize();
}
@@ -112,7 +114,8 @@
TEST(CFACWithChrome, CreateNotSoFast) {
MockCFDelegate cfd;
chrome_frame_test::TimedMsgLoop loop;
- const std::wstring profile = L"Adam.N.Epilinter";
+ const FilePath profile_path(
+ chrome_frame_test::GetProfilePath(L"Adam.N.Epilinter"));
int timeout = 10000;
scoped_refptr<ChromeFrameAutomationClient> client;
@@ -125,7 +128,8 @@
EXPECT_CALL(cfd, OnAutomationServerLaunchFailed(_, _))
.Times(0);
- EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile, L"", false));
+ EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile_path, L"",
+ false));
loop.RunFor(11);
client->Uninitialize();
@@ -135,8 +139,9 @@
TEST(CFACWithChrome, NavigateOk) {
MockCFDelegate cfd;
chrome_frame_test::TimedMsgLoop loop;
- const std::wstring profile = L"Adam.N.Epilinter";
const std::string url = "about:version";
+ const FilePath profile_path(
+ chrome_frame_test::GetProfilePath(L"Adam.N.Epilinter"));
int timeout = 10000;
scoped_refptr<ChromeFrameAutomationClient> client;
@@ -165,7 +170,8 @@
.WillOnce(QUIT_LOOP(loop));
}
- EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile, L"", false));
+ EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile_path, L"",
+ false));
loop.RunFor(10);
client->Uninitialize();
client = NULL;
@@ -174,7 +180,8 @@
TEST(CFACWithChrome, NavigateFailed) {
MockCFDelegate cfd;
chrome_frame_test::TimedMsgLoop loop;
- const std::wstring profile = L"Adam.N.Epilinter";
+ const FilePath profile_path(
+ chrome_frame_test::GetProfilePath(L"Adam.N.Epilinter"));
const std::string url = "http://127.0.0.3:65412/";
const URLRequestStatus connection_failed(URLRequestStatus::FAILED,
net::ERR_INVALID_URL);
@@ -204,7 +211,8 @@
.Times(1)
.WillOnce(QUIT_LOOP_SOON(loop, 2));
- EXPECT_TRUE(client->Initialize(&cfd, 10000, false, profile, L"", false));
+ EXPECT_TRUE(client->Initialize(&cfd, 10000, false, profile_path, L"",
+ false));
loop.RunFor(10);
client->Uninitialize();
@@ -237,7 +245,8 @@
EXPECT_CALL(proxy_, CancelAsync(_)).Times(testing::AnyNumber());
// Here we go!
- EXPECT_TRUE(client_->Initialize(&cfd_, timeout, false, profile_, L"", false));
+ EXPECT_TRUE(client_->Initialize(&cfd_, timeout, false, profile_path_, L"",
+ false));
loop_.RunFor(10);
client_->Uninitialize();
}
@@ -262,7 +271,7 @@
Set_CFD_LaunchFailed(AUTOMATION_CREATE_TAB_FAILED);
// Here we go!
- EXPECT_TRUE(client_->Initialize(&cfd_, timeout_, false, profile_, L"",
+ EXPECT_TRUE(client_->Initialize(&cfd_, timeout_, false, profile_path_, L"",
false));
loop_.RunFor(4);
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