| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 2 // 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 | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 
| 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 
| 7 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 38 | 38 | 
| 39   MOCK_METHOD1(OnDidNavigate, void(const NavigationInfo& nav_info)); | 39   MOCK_METHOD1(OnDidNavigate, void(const NavigationInfo& nav_info)); | 
| 40   MOCK_METHOD3(OnForwardMessageToExternalHost, void( | 40   MOCK_METHOD3(OnForwardMessageToExternalHost, void( | 
| 41       const std::string& message, const std::string& origin, | 41       const std::string& message, const std::string& origin, | 
| 42       const std::string& target)); | 42       const std::string& target)); | 
| 43   MOCK_METHOD2(OnRequestStart, void(int request_id, | 43   MOCK_METHOD2(OnRequestStart, void(int request_id, | 
| 44       const AutomationURLRequest& request)); | 44       const AutomationURLRequest& request)); | 
| 45   MOCK_METHOD2(OnRequestRead, void(int request_id, | 45   MOCK_METHOD2(OnRequestRead, void(int request_id, | 
| 46       int bytes_to_read)); | 46       int bytes_to_read)); | 
| 47   MOCK_METHOD2(OnRequestEnd, void(int request_id, | 47   MOCK_METHOD2(OnRequestEnd, void(int request_id, | 
| 48       const URLRequestStatus& status)); | 48       const net::URLRequestStatus& status)); | 
| 49   MOCK_METHOD2(OnSetCookieAsync, void(const GURL& url, | 49   MOCK_METHOD2(OnSetCookieAsync, void(const GURL& url, | 
| 50       const std::string& cookie)); | 50       const std::string& cookie)); | 
| 51   MOCK_METHOD1(HandleClosed, void(int handle)); | 51   MOCK_METHOD1(HandleClosed, void(int handle)); | 
| 52 | 52 | 
| 53 | 53 | 
| 54   MOCK_METHOD3(OnOpenURL, void(const GURL& url, | 54   MOCK_METHOD3(OnOpenURL, void(const GURL& url, | 
| 55       const GURL& referrer, int open_disposition)); | 55       const GURL& referrer, int open_disposition)); | 
| 56   MOCK_METHOD2(OnNavigationStateChanged, void(int flags, | 56   MOCK_METHOD2(OnNavigationStateChanged, void(int flags, | 
| 57       const NavigationInfo& nav_info)); | 57       const NavigationInfo& nav_info)); | 
| 58   MOCK_METHOD1(OnAttachExternalTab, void( | 58   MOCK_METHOD1(OnAttachExternalTab, void( | 
| 59       const AttachExternalTabParams& params)); | 59       const AttachExternalTabParams& params)); | 
| 60   MOCK_METHOD1(OnLoad, void(const GURL&url)); | 60   MOCK_METHOD1(OnLoad, void(const GURL&url)); | 
| 61 | 61 | 
| 62 | 62 | 
| 63   // Action helpers for OnRequest* incoming messages. Create the message and | 63   // Action helpers for OnRequest* incoming messages. Create the message and | 
| 64   // delegate sending to the base class. Apparently we do not have wrappers | 64   // delegate sending to the base class. Apparently we do not have wrappers | 
| 65   // in AutomationProxy for these messages. | 65   // in AutomationProxy for these messages. | 
| 66   void ReplyStarted(const AutomationURLResponse* response, | 66   void ReplyStarted(const AutomationURLResponse* response, | 
| 67                     int tab_handle, int request_id); | 67                     int tab_handle, int request_id); | 
| 68   void ReplyData(const std::string* data, int tab_handle, int request_id); | 68   void ReplyData(const std::string* data, int tab_handle, int request_id); | 
| 69   void ReplyEOF(int tab_handle, int request_id); | 69   void ReplyEOF(int tab_handle, int request_id); | 
| 70   void ReplyEnd(const URLRequestStatus& status, int tab_handle, int request_id); | 70   void ReplyEnd(const net::URLRequestStatus& status, | 
|  | 71                 int tab_handle, | 
|  | 72                 int request_id); | 
| 71   void Reply404(int tab_handle, int request_id); | 73   void Reply404(int tab_handle, int request_id); | 
| 72 | 74 | 
| 73   // Test setup helpers | 75   // Test setup helpers | 
| 74   scoped_refptr<TabProxy> CreateHostWindowAndTab( | 76   scoped_refptr<TabProxy> CreateHostWindowAndTab( | 
| 75       const ExternalTabSettings& settings); | 77       const ExternalTabSettings& settings); | 
| 76   scoped_refptr<TabProxy> CreateTabWithUrl(const GURL& initial_url); | 78   scoped_refptr<TabProxy> CreateTabWithUrl(const GURL& initial_url); | 
| 77   void NavigateInExternalTab(int tab_handle, const GURL& url, | 79   void NavigateInExternalTab(int tab_handle, const GURL& url, | 
| 78                              const GURL& referrer = GURL()); | 80                              const GURL& referrer = GURL()); | 
| 79 | 81 | 
| 80   // Navigation using keyboard (TAB + Enter) inside the page. | 82   // Navigation using keyboard (TAB + Enter) inside the page. | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 115  protected: | 117  protected: | 
| 116   // Filtered Inet will override automation callbacks for network resources. | 118   // Filtered Inet will override automation callbacks for network resources. | 
| 117   virtual bool ShouldFilterInet() { | 119   virtual bool ShouldFilterInet() { | 
| 118     return false; | 120     return false; | 
| 119   } | 121   } | 
| 120   ExternalTabUITestMockClient* mock_; | 122   ExternalTabUITestMockClient* mock_; | 
| 121   std::string channel_id_;      // Channel id of automation proxy. | 123   std::string channel_id_;      // Channel id of automation proxy. | 
| 122 }; | 124 }; | 
| 123 | 125 | 
| 124 #endif  // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 126 #endif  // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 
| OLD | NEW | 
|---|