OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 PPAPI_TESTS_TESTING_INSTANCE_H_ | 5 #ifndef PPAPI_TESTS_TESTING_INSTANCE_H_ |
6 #define PPAPI_TESTS_TESTING_INSTANCE_H_ | 6 #define PPAPI_TESTS_TESTING_INSTANCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/utility/completion_callback_factory.h" | 10 #include "ppapi/utility/completion_callback_factory.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Passes the message_data through to the HandleMessage method on the | 83 // Passes the message_data through to the HandleMessage method on the |
84 // TestClass object that's associated with this instance. | 84 // TestClass object that's associated with this instance. |
85 virtual void HandleMessage(const pp::Var& message_data); | 85 virtual void HandleMessage(const pp::Var& message_data); |
86 | 86 |
87 const std::string& protocol() { | 87 const std::string& protocol() { |
88 return protocol_; | 88 return protocol_; |
89 } | 89 } |
90 | 90 |
91 int ssl_server_port() { return ssl_server_port_; } | 91 int ssl_server_port() { return ssl_server_port_; } |
92 | 92 |
| 93 const std::string& websocket_host() { return websocket_host_; } |
93 int websocket_port() { return websocket_port_; } | 94 int websocket_port() { return websocket_port_; } |
94 | 95 |
95 // Posts a message to the test page to eval() the script. | 96 // Posts a message to the test page to eval() the script. |
96 void EvalScript(const std::string& script); | 97 void EvalScript(const std::string& script); |
97 | 98 |
98 // Sets the given cookie in the current document. | 99 // Sets the given cookie in the current document. |
99 void SetCookie(const std::string& name, const std::string& value); | 100 void SetCookie(const std::string& name, const std::string& value); |
100 | 101 |
101 void ReportProgress(const std::string& progress_value); | 102 void ReportProgress(const std::string& progress_value); |
102 | 103 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // True if running in Native Client. | 160 // True if running in Native Client. |
160 bool nacl_mode_; | 161 bool nacl_mode_; |
161 | 162 |
162 // String representing the protocol. Used for detecting whether we're running | 163 // String representing the protocol. Used for detecting whether we're running |
163 // with http. | 164 // with http. |
164 std::string protocol_; | 165 std::string protocol_; |
165 | 166 |
166 // SSL server port. | 167 // SSL server port. |
167 int ssl_server_port_; | 168 int ssl_server_port_; |
168 | 169 |
| 170 // WebSocket host. |
| 171 std::string websocket_host_; |
| 172 |
169 // WebSocket port. | 173 // WebSocket port. |
170 int websocket_port_; | 174 int websocket_port_; |
171 | 175 |
172 // At the end of each set of tests, the plugin is removed from the web-page. | 176 // At the end of each set of tests, the plugin is removed from the web-page. |
173 // However, for some tests, it is desirable to not remove the plguin from the | 177 // However, for some tests, it is desirable to not remove the plguin from the |
174 // page. | 178 // page. |
175 bool remove_plugin_; | 179 bool remove_plugin_; |
176 }; | 180 }; |
177 | 181 |
178 #endif // PPAPI_TESTS_TESTING_INSTANCE_H_ | 182 #endif // PPAPI_TESTS_TESTING_INSTANCE_H_ |
OLD | NEW |