summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
authorhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 16:05:36 +0000
committerhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 16:05:36 +0000
commitd57b6ab5930b827b56d412b1d334620c91e8cdbd (patch)
tree7ec5d9867db431d3a89092fcebd2327078c64c16 /chrome_frame/test
parent8073fb0ca593e537c75d1b40b7206b4f58434d86 (diff)
downloadchromium_src-d57b6ab5930b827b56d412b1d334620c91e8cdbd.zip
chromium_src-d57b6ab5930b827b56d412b1d334620c91e8cdbd.tar.gz
chromium_src-d57b6ab5930b827b56d412b1d334620c91e8cdbd.tar.bz2
The ChromeFrame objects now provides an unfrozen interface called IChromeFramePrivate. This interface provides a GetSessionId() which returns the ID used by Chrome in its Tab javascript object.
Review URL: http://codereview.chromium.org/3541017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64252 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/automation_client_mock.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome_frame/test/automation_client_mock.cc b/chrome_frame/test/automation_client_mock.cc
index a77b023..7e8f317 100644
--- a/chrome_frame/test/automation_client_mock.cc
+++ b/chrome_frame/test/automation_client_mock.cc
@@ -70,13 +70,15 @@ MATCHER_P(EqNavigationInfoUrl, url, "IPC::NavigationInfo matcher") {
}
// Could be implemented as MockAutomationProxy member (we have WithArgs<>!)
-ACTION_P3(HandleCreateTab, tab_handle, external_tab_container, tab_wnd) {
+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);
+ tab_handle,
+ session_id);
CreateExternalTabContext* context =
reinterpret_cast<CreateExternalTabContext*>(arg1);
DispatchToMethod(context, &CreateExternalTabContext::Completed, input_args);
@@ -253,7 +255,7 @@ TEST_F(CFACMockTest, MockedCreateTabOk) {
EXPECT_CALL(mock_proxy_, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _))
- .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2));
+ .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99));
EXPECT_CALL(mock_proxy_, CreateTabProxy(testing::Eq(tab_handle_)))
.WillOnce(Return(tab_));
@@ -287,7 +289,8 @@ TEST_F(CFACMockTest, MockedCreateTabFailed) {
EXPECT_CALL(mock_proxy_, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _))
- .Times(1).WillOnce(HandleCreateTab(tab_handle_, null_wnd, null_wnd));
+ .Times(1).WillOnce(HandleCreateTab(tab_handle_, null_wnd, null_wnd,
+ 99));
EXPECT_CALL(mock_proxy_, CreateTabProxy(_)).Times(0);
@@ -348,9 +351,9 @@ TEST_F(CFACMockTest, OnChannelError) {
EXPECT_CALL(proxy, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _)).Times(3)
- .WillOnce(HandleCreateTab(tab_handle_, h1, h2))
- .WillOnce(HandleCreateTab(tab_handle_ * 2, h1, h2))
- .WillOnce(HandleCreateTab(tab_handle_ * 3, h1, h2));
+ .WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99))
+ .WillOnce(HandleCreateTab(tab_handle_ * 2, h1, h2, 100))
+ .WillOnce(HandleCreateTab(tab_handle_ * 3, h1, h2, 101));
SetAutomationServerOk(3);
@@ -428,7 +431,7 @@ TEST_F(CFACMockTest, NavigateTwiceAfterInitToSameUrl) {
EXPECT_CALL(mock_proxy_, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _))
- .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2));
+ .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99));
EXPECT_CALL(mock_proxy_, CreateTabProxy(testing::Eq(tab_handle_)))
.WillOnce(Return(tab_));