| OLD | NEW |
| 1 | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 3 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 5 | 4 |
| 6 #include <string> | 5 #include <string> |
| 7 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 8 #include "base/synchronization/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
| 9 #include "chrome/common/automation_messages.h" | 8 #include "chrome/common/automation_messages.h" |
| 10 #include "chrome_frame/cfproxy_private.h" | 9 #include "chrome_frame/cfproxy_private.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 enum AutomationMsg_ExtensionResponseValues res, SyncMessageContext* ctx)); | 44 enum AutomationMsg_ExtensionResponseValues res, SyncMessageContext* ctx)); |
| 46 MOCK_METHOD3(Completed_LoadExpandedExtension, void(bool success, | 45 MOCK_METHOD3(Completed_LoadExpandedExtension, void(bool success, |
| 47 enum AutomationMsg_ExtensionResponseValues res, SyncMessageContext* ctx)); | 46 enum AutomationMsg_ExtensionResponseValues res, SyncMessageContext* ctx)); |
| 48 MOCK_METHOD2(Completed_GetEnabledExtensions, void(bool success, | 47 MOCK_METHOD2(Completed_GetEnabledExtensions, void(bool success, |
| 49 const std::vector<FilePath>* v)); | 48 const std::vector<FilePath>* v)); |
| 50 | 49 |
| 51 // Network requests from Chrome. | 50 // Network requests from Chrome. |
| 52 MOCK_METHOD2(Network_Start, void(int request_id, | 51 MOCK_METHOD2(Network_Start, void(int request_id, |
| 53 const AutomationURLRequest& request_info)); | 52 const AutomationURLRequest& request_info)); |
| 54 MOCK_METHOD2(Network_Read, void(int request_id, int bytes_to_read)); | 53 MOCK_METHOD2(Network_Read, void(int request_id, int bytes_to_read)); |
| 55 MOCK_METHOD2(Network_End, void(int request_id, const URLRequestStatus& s)); | 54 MOCK_METHOD2(Network_End, void(int request_id, |
| 55 const net::URLRequestStatus& s)); |
| 56 MOCK_METHOD1(Network_DownloadInHost, void(int request_id)); | 56 MOCK_METHOD1(Network_DownloadInHost, void(int request_id)); |
| 57 MOCK_METHOD2(GetCookies, void(const GURL& url, int cookie_id)); | 57 MOCK_METHOD2(GetCookies, void(const GURL& url, int cookie_id)); |
| 58 MOCK_METHOD2(SetCookie, void(const GURL& url, const std::string& cookie)); | 58 MOCK_METHOD2(SetCookie, void(const GURL& url, const std::string& cookie)); |
| 59 | 59 |
| 60 // Navigation progress notifications. | 60 // Navigation progress notifications. |
| 61 MOCK_METHOD2(NavigationStateChanged, void(int flags, | 61 MOCK_METHOD2(NavigationStateChanged, void(int flags, |
| 62 const NavigationInfo& nav_info)); | 62 const NavigationInfo& nav_info)); |
| 63 MOCK_METHOD1(UpdateTargetUrl, void(const std::wstring& url)); | 63 MOCK_METHOD1(UpdateTargetUrl, void(const std::wstring& url)); |
| 64 MOCK_METHOD2(NavigationFailed, void(int error_code, const GURL& gurl)); | 64 MOCK_METHOD2(NavigationFailed, void(int error_code, const GURL& gurl)); |
| 65 MOCK_METHOD1(DidNavigate, void(const NavigationInfo& navigation_info)); | 65 MOCK_METHOD1(DidNavigate, void(const NavigationInfo& navigation_info)); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 &SyncMsgSender::OnReplyReceived, r2.get())); | 366 &SyncMsgSender::OnReplyReceived, r2.get())); |
| 367 ipc.Stop(); | 367 ipc.Stop(); |
| 368 | 368 |
| 369 // Expect that tab 6 has been associated with the delegate. | 369 // Expect that tab 6 has been associated with the delegate. |
| 370 EXPECT_EQ(&d1, tab2delegate[6]); | 370 EXPECT_EQ(&d1, tab2delegate[6]); |
| 371 } | 371 } |
| 372 | 372 |
| 373 TEST(SyncMsgSender, OnChannelClosed) { | 373 TEST(SyncMsgSender, OnChannelClosed) { |
| 374 // TODO(stoyan): implement. | 374 // TODO(stoyan): implement. |
| 375 } | 375 } |
| OLD | NEW |