OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // want invisible window since SetCookie is a sync call and a deadlock is | 94 // want invisible window since SetCookie is a sync call and a deadlock is |
95 // very possible. | 95 // very possible. |
96 unsigned long host_window_style_; | 96 unsigned long host_window_style_; |
97 | 97 |
98 static const AutomationURLResponse http_200; | 98 static const AutomationURLResponse http_200; |
99 static const ExternalTabSettings default_settings; | 99 static const ExternalTabSettings default_settings; |
100 protected: | 100 protected: |
101 gfx::NativeWindow host_window_; | 101 gfx::NativeWindow host_window_; |
102 | 102 |
103 // Simple dispatcher to above OnXXX methods. | 103 // Simple dispatcher to above OnXXX methods. |
104 virtual void OnMessageReceived(const IPC::Message& msg); | 104 virtual bool OnMessageReceived(const IPC::Message& msg); |
105 virtual void InvalidateHandle(const IPC::Message& message); | 105 virtual void InvalidateHandle(const IPC::Message& message); |
106 }; | 106 }; |
107 | 107 |
108 // Base your external tab UI tests on this. | 108 // Base your external tab UI tests on this. |
109 class ExternalTabUITest : public UITest { | 109 class ExternalTabUITest : public UITest { |
110 public: | 110 public: |
111 ExternalTabUITest() : UITest(MessageLoop::TYPE_UI) {} | 111 ExternalTabUITest() : UITest(MessageLoop::TYPE_UI) {} |
112 // Override UITest's CreateProxyLauncher to provide the unit test | 112 // Override UITest's CreateProxyLauncher to provide the unit test |
113 // with our special implementation of AutomationProxy. | 113 // with our special implementation of AutomationProxy. |
114 // This function is called from within UITest::SetUp(). | 114 // This function is called from within UITest::SetUp(). |
115 virtual ProxyLauncher* CreateProxyLauncher(); | 115 virtual ProxyLauncher* CreateProxyLauncher(); |
116 protected: | 116 protected: |
117 // Filtered Inet will override automation callbacks for network resources. | 117 // Filtered Inet will override automation callbacks for network resources. |
118 virtual bool ShouldFilterInet() { | 118 virtual bool ShouldFilterInet() { |
119 return false; | 119 return false; |
120 } | 120 } |
121 ExternalTabUITestMockClient* mock_; | 121 ExternalTabUITestMockClient* mock_; |
122 std::string channel_id_; // Channel id of automation proxy. | 122 std::string channel_id_; // Channel id of automation proxy. |
123 }; | 123 }; |
124 | 124 |
125 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 125 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ |
OLD | NEW |