summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/automation_client_mock.cc73
-rw-r--r--chrome_frame/test/chrome_frame_automation_mock.h26
2 files changed, 14 insertions, 85 deletions
diff --git a/chrome_frame/test/automation_client_mock.cc b/chrome_frame/test/automation_client_mock.cc
index b64a7cb..f699635 100644
--- a/chrome_frame/test/automation_client_mock.cc
+++ b/chrome_frame/test/automation_client_mock.cc
@@ -100,17 +100,7 @@ TEST(CFACWithChrome, CreateTooFast) {
.Times(1)
.WillOnce(QUIT_LOOP(loop));
- ChromeFrameLaunchParams cfp = {
- timeout,
- GURL(),
- GURL(),
- profile,
- L"",
- false,
- false,
- false
- };
- EXPECT_TRUE(client->Initialize(&cfd, cfp));
+ EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile, L"", false));
loop.RunFor(10);
client->Uninitialize();
}
@@ -135,17 +125,7 @@ TEST(CFACWithChrome, CreateNotSoFast) {
EXPECT_CALL(cfd, OnAutomationServerLaunchFailed(_, _))
.Times(0);
- ChromeFrameLaunchParams cfp = {
- timeout,
- GURL(),
- GURL(),
- profile,
- L"",
- false,
- false,
- false
- };
- EXPECT_TRUE(client->Initialize(&cfd, cfp));
+ EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile, L"", false));
loop.RunFor(11);
client->Uninitialize();
@@ -185,17 +165,7 @@ TEST(CFACWithChrome, NavigateOk) {
.WillOnce(QUIT_LOOP(loop));
}
- ChromeFrameLaunchParams cfp = {
- timeout,
- GURL(),
- GURL(),
- profile,
- L"",
- false,
- false,
- false
- };
- EXPECT_TRUE(client->Initialize(&cfd, cfp));
+ EXPECT_TRUE(client->Initialize(&cfd, timeout, false, profile, L"", false));
loop.RunFor(10);
client->Uninitialize();
client = NULL;
@@ -234,17 +204,7 @@ TEST(CFACWithChrome, NavigateFailed) {
.Times(1)
.WillOnce(QUIT_LOOP_SOON(loop, 2));
- ChromeFrameLaunchParams cfp = {
- 10000,
- GURL(),
- GURL(),
- profile,
- L"",
- false,
- false,
- false
- };
- EXPECT_TRUE(client->Initialize(&cfd, cfp));
+ EXPECT_TRUE(client->Initialize(&cfd, 10000, false, profile, L"", false));
loop.RunFor(10);
client->Uninitialize();
@@ -277,17 +237,7 @@ TEST_F(CFACMockTest, MockedCreateTabOk) {
EXPECT_CALL(proxy_, CancelAsync(_)).Times(testing::AnyNumber());
// Here we go!
- ChromeFrameLaunchParams cfp = {
- timeout,
- GURL(),
- GURL(),
- profile_,
- L"",
- false,
- false,
- false
- };
- EXPECT_TRUE(client_->Initialize(&cfd_, cfp));
+ EXPECT_TRUE(client_->Initialize(&cfd_, timeout, false, profile_, L"", false));
loop_.RunFor(10);
client_->Uninitialize();
}
@@ -312,17 +262,8 @@ TEST_F(CFACMockTest, MockedCreateTabFailed) {
Set_CFD_LaunchFailed(AUTOMATION_CREATE_TAB_FAILED);
// Here we go!
- ChromeFrameLaunchParams cfp = {
- timeout_,
- GURL(),
- GURL(),
- profile_,
- L"",
- false,
- false,
- false
- };
- EXPECT_TRUE(client_->Initialize(&cfd_, cfp));
+ EXPECT_TRUE(client_->Initialize(&cfd_, timeout_, false, profile_, L"",
+ false));
loop_.RunFor(4);
client_->Uninitialize();
}
diff --git a/chrome_frame/test/chrome_frame_automation_mock.h b/chrome_frame/test/chrome_frame_automation_mock.h
index d751f1b..6fea200 100644
--- a/chrome_frame/test/chrome_frame_automation_mock.h
+++ b/chrome_frame/test/chrome_frame_automation_mock.h
@@ -20,23 +20,13 @@ class AutomationMockDelegate
AutomationMockDelegate(MessageLoop* caller_message_loop,
int launch_timeout, bool perform_version_check,
const std::wstring& profile_name,
- const std::wstring& extra_chrome_arguments, bool incognito,
- bool is_widget_mode)
+ const std::wstring& extra_chrome_arguments, bool incognito)
: caller_message_loop_(caller_message_loop), is_connected_(false),
navigation_result_(false) {
test_server_.SetUp();
automation_client_ = new ChromeFrameAutomationClient;
- ChromeFrameLaunchParams cfp = {
- launch_timeout,
- GURL(),
- GURL(),
- profile_name,
- extra_chrome_arguments,
- perform_version_check,
- incognito,
- is_widget_mode
- };
- automation_client_->Initialize(this, cfp);
+ automation_client_->Initialize(this, launch_timeout, perform_version_check,
+ profile_name, extra_chrome_arguments, incognito);
}
~AutomationMockDelegate() {
if (automation_client_.get()) {
@@ -140,8 +130,7 @@ class AutomationMockLaunch
typedef AutomationMockDelegate<AutomationMockLaunch> Base;
AutomationMockLaunch(MessageLoop* caller_message_loop,
int launch_timeout)
- : Base(caller_message_loop, launch_timeout, true, L"", L"", false,
- false) {
+ : Base(caller_message_loop, launch_timeout, true, L"", L"", false) {
}
virtual void OnAutomationServerReady() {
Base::OnAutomationServerReady();
@@ -158,8 +147,7 @@ class AutomationMockNavigate
typedef AutomationMockDelegate<AutomationMockNavigate> Base;
AutomationMockNavigate(MessageLoop* caller_message_loop,
int launch_timeout)
- : Base(caller_message_loop, launch_timeout, true, L"", L"", false,
- false) {
+ : Base(caller_message_loop, launch_timeout, true, L"", L"", false) {
}
virtual void OnLoad(int tab_handle, const GURL& url) {
Base::OnLoad(tab_handle, url);
@@ -173,7 +161,7 @@ class AutomationMockPostMessage
typedef AutomationMockDelegate<AutomationMockPostMessage> Base;
AutomationMockPostMessage(MessageLoop* caller_message_loop,
int launch_timeout)
- : Base(caller_message_loop, launch_timeout, true, L"", L"", false, false),
+ : Base(caller_message_loop, launch_timeout, true, L"", L"", false),
postmessage_result_(false) {}
bool postmessage_result() const {
return postmessage_result_;
@@ -201,7 +189,7 @@ class AutomationMockHostNetworkRequestStart
typedef AutomationMockDelegate<AutomationMockHostNetworkRequestStart> Base;
AutomationMockHostNetworkRequestStart(MessageLoop* caller_message_loop,
int launch_timeout)
- : Base(caller_message_loop, launch_timeout, true, L"", L"", false, false),
+ : Base(caller_message_loop, launch_timeout, true, L"", L"", false),
request_start_result_(false) {
if (automation()) {
automation()->set_use_chrome_network(false);