summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/chrome_frame_unittests.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/test/chrome_frame_unittests.cc')
-rw-r--r--chrome_frame/test/chrome_frame_unittests.cc66
1 files changed, 61 insertions, 5 deletions
diff --git a/chrome_frame/test/chrome_frame_unittests.cc b/chrome_frame/test/chrome_frame_unittests.cc
index fc4fd1a..9302105 100644
--- a/chrome_frame/test/chrome_frame_unittests.cc
+++ b/chrome_frame/test/chrome_frame_unittests.cc
@@ -652,7 +652,16 @@ TEST(ProxyFactoryTest, CreateDestroy) {
ProxyFactory f;
LaunchDelegateMock d;
EXPECT_CALL(d, LaunchComplete(testing::NotNull(), testing::_)).Times(1);
- void* id = f.GetAutomationServer(0, L"Adam.N.Epilinter", L"", false, &d);
+
+ ChromeFrameLaunchParams params;
+ params.automation_server_launch_timeout = 0;
+ params.profile_name = L"Adam.N.Epilinter";
+ params.extra_chrome_arguments = L"";
+ params.perform_version_check = false;
+ params.incognito_mode = false;
+
+ void* id = NULL;
+ f.GetAutomationServer(&d, params, &id);
f.ReleaseAutomationServer(id);
}
@@ -660,8 +669,20 @@ TEST(ProxyFactoryTest, CreateSameProfile) {
ProxyFactory f;
LaunchDelegateMock d;
EXPECT_CALL(d, LaunchComplete(testing::NotNull(), testing::_)).Times(2);
- void* i1 = f.GetAutomationServer(0, L"Dr. Gratiano Forbeson", L"", false, &d);
- void* i2 = f.GetAutomationServer(0, L"Dr. Gratiano Forbeson", L"", false, &d);
+
+ ChromeFrameLaunchParams params;
+ params.automation_server_launch_timeout = 0;
+ params.profile_name = L"Dr. Gratiano Forbeson";
+ params.extra_chrome_arguments = L"";
+ params.perform_version_check = false;
+ params.incognito_mode = false;
+
+ void* i1 = NULL;
+ void* i2 = NULL;
+
+ f.GetAutomationServer(&d, params, &i1);
+ f.GetAutomationServer(&d, params, &i2);
+
EXPECT_EQ(i1, i2);
f.ReleaseAutomationServer(i2);
f.ReleaseAutomationServer(i1);
@@ -671,8 +692,27 @@ TEST(ProxyFactoryTest, CreateDifferentProfiles) {
ProxyFactory f;
LaunchDelegateMock d;
EXPECT_CALL(d, LaunchComplete(testing::NotNull(), testing::_)).Times(2);
- void* i1 = f.GetAutomationServer(0, L"Adam.N.Epilinter", L"", false, &d);
- void* i2 = f.GetAutomationServer(0, L"Dr. Gratiano Forbeson", L"", false, &d);
+
+ ChromeFrameLaunchParams params1;
+ params1.automation_server_launch_timeout = 0;
+ params1.profile_name = L"Adam.N.Epilinter";
+ params1.extra_chrome_arguments = L"";
+ params1.perform_version_check = false;
+ params1.incognito_mode = false;
+
+ ChromeFrameLaunchParams params2;
+ params2.automation_server_launch_timeout = 0;
+ params2.profile_name = L"Dr. Gratiano Forbeson";
+ params2.extra_chrome_arguments = L"";
+ params2.perform_version_check = false;
+ params2.incognito_mode = false;
+
+ void* i1 = NULL;
+ void* i2 = NULL;
+
+ f.GetAutomationServer(&d, params1, &i1);
+ f.GetAutomationServer(&d, params2, &i2);
+
EXPECT_NE(i1, i2);
f.ReleaseAutomationServer(i2);
f.ReleaseAutomationServer(i1);
@@ -1667,3 +1707,19 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_ChromeFrameXHRTest) {
ASSERT_TRUE(CheckResultFile(L"FullTab_XMLHttpRequestTest", "OK"));
}
+const wchar_t kMultipleCFInstancesTestUrl[] =
+ L"files/multiple_cf_instances_main.html";
+
+TEST_F(ChromeFrameTestWithWebServer, WidgetModeIE_MultipleCFInstances) {
+ SimpleBrowserTest(IE, kMultipleCFInstancesTestUrl,
+ L"WidgetMode_MultipleInstancesTest");
+}
+
+// TODO(ananta)
+// Disabled until I figure out why this does not work on Firefox.
+TEST_F(ChromeFrameTestWithWebServer,
+ DISABLED_WidgetModeFF_MultipleCFInstances) {
+ SimpleBrowserTest(FIREFOX, kMultipleCFInstancesTestUrl,
+ L"WidgetMode_MultipleInstancesTest");
+}
+