summaryrefslogtreecommitdiffstats
path: root/chrome_frame/cfproxy_test.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 18:56:35 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 18:56:35 +0000
commit785993e730139a6c5a93b69ca4dfdc313db59895 (patch)
tree5a33a5b01a70bc344f438b84a1023d6ef8f8f12e /chrome_frame/cfproxy_test.cc
parent4d10edeb5f3db4366b4521c2346bfb4741c21e6f (diff)
downloadchromium_src-785993e730139a6c5a93b69ca4dfdc313db59895.zip
chromium_src-785993e730139a6c5a93b69ca4dfdc313db59895.tar.gz
chromium_src-785993e730139a6c5a93b69ca4dfdc313db59895.tar.bz2
Reverting this to see if this fixes ChromeFrame tests. Please reland with the tests fixed.
Revert 64252 - 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 TBR=hansl@google.com Review URL: http://codereview.chromium.org/4134008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/cfproxy_test.cc')
-rw-r--r--chrome_frame/cfproxy_test.cc26
1 files changed, 6 insertions, 20 deletions
diff --git a/chrome_frame/cfproxy_test.cc b/chrome_frame/cfproxy_test.cc
index 566a398..28ba8c6 100644
--- a/chrome_frame/cfproxy_test.cc
+++ b/chrome_frame/cfproxy_test.cc
@@ -33,8 +33,8 @@ struct MockChromeProxyDelegate : public ChromeProxyDelegate {
MOCK_METHOD0(Disconnected, void());
MOCK_METHOD0(tab_handle, int());
- MOCK_METHOD5(Completed_CreateTab, void(bool success, HWND chrome_wnd,
- HWND tab_window, int tab_handle, int session_id));
+ MOCK_METHOD4(Completed_CreateTab, void(bool success, HWND chrome_wnd,
+ HWND tab_window, int tab_handle));
MOCK_METHOD4(Completed_ConnectToTab, void(bool success, HWND chrome_window,
HWND tab_window, int tab_handle));
MOCK_METHOD2(Completed_Navigate, void(bool success,
@@ -316,16 +316,7 @@ inline IPC::Message* CreateReply(M* m, const A& a, const B& b, const C& c) {
}
return r;
}
-
-template <typename M, typename A, typename B, typename C, typename D>
-inline IPC::Message* CreateReply(M* m, const A& a, const B& b, const C& c,
- const D& d) {
- IPC::Message* r = IPC::SyncMessage::GenerateReply(m);
- if (r) {
- M::WriteReplyParams(r, a, b, c, d);
- }
- return r;
-}} // namespace
+} // namespace
DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncMsgSender);
TEST(SyncMsgSender, Deserialize) {
@@ -338,16 +329,12 @@ TEST(SyncMsgSender, Deserialize) {
TabsMap tab2delegate;
SyncMsgSender queue(&tab2delegate);
- const int kTabHandle = 6;
- const int kSessionId = 8;
-
// Create some sync messages and their replies.
AutomationMsg_InstallExtension m1(0, FilePath(L"c:\\awesome.x"), 0);
- AutomationMsg_CreateExternalTab m2(0, IPC::ExternalTabSettings(), 0, 0, 0, 0);
+ AutomationMsg_CreateExternalTab m2(0, IPC::ExternalTabSettings(), 0, 0, 0);
scoped_ptr<IPC::Message> r1(CreateReply(&m1,
AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED));
- scoped_ptr<IPC::Message> r2(CreateReply(&m2, (HWND)1, (HWND)2, kTabHandle,
- kSessionId));
+ scoped_ptr<IPC::Message> r2(CreateReply(&m2, (HWND)1, (HWND)2, 6));
queue.QueueSyncMessage(&m1, &d1, NULL);
queue.QueueSyncMessage(&m2, &d1, NULL);
@@ -355,8 +342,7 @@ TEST(SyncMsgSender, Deserialize) {
testing::InSequence s;
EXPECT_CALL(d1, Completed_InstallExtension(true,
AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED, NULL));
- EXPECT_CALL(d1, Completed_CreateTab(true, (HWND)1, (HWND)2, kTabHandle,
- kSessionId));
+ EXPECT_CALL(d1, Completed_CreateTab(true, (HWND)1, (HWND)2, 6));
// Execute replies in a worker thread.
ipc.message_loop()->PostTask(FROM_HERE, NewRunnableMethod(&queue,