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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void AppendError(const std::string& message); | 75 void AppendError(const std::string& message); |
76 | 76 |
77 // Passes the message_data through to the HandleMessage method on the | 77 // Passes the message_data through to the HandleMessage method on the |
78 // TestClass object that's associated with this instance. | 78 // TestClass object that's associated with this instance. |
79 virtual void HandleMessage(const pp::Var& message_data); | 79 virtual void HandleMessage(const pp::Var& message_data); |
80 | 80 |
81 const std::string& protocol() { | 81 const std::string& protocol() { |
82 return protocol_; | 82 return protocol_; |
83 } | 83 } |
84 | 84 |
| 85 int ssl_server_port() { return ssl_server_port_; } |
| 86 |
85 int websocket_port() { return websocket_port_; } | 87 int websocket_port() { return websocket_port_; } |
86 | 88 |
87 // Posts a message to the test page to eval() the script. | 89 // Posts a message to the test page to eval() the script. |
88 void EvalScript(const std::string& script); | 90 void EvalScript(const std::string& script); |
89 | 91 |
90 // Sets the given cookie in the current document. | 92 // Sets the given cookie in the current document. |
91 void SetCookie(const std::string& name, const std::string& value); | 93 void SetCookie(const std::string& name, const std::string& value); |
92 | 94 |
93 void ReportProgress(const std::string& progress_value); | 95 void ReportProgress(const std::string& progress_value); |
94 | 96 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Collects all errors to send the the browser. Empty indicates no error yet. | 144 // Collects all errors to send the the browser. Empty indicates no error yet. |
143 std::string errors_; | 145 std::string errors_; |
144 | 146 |
145 // True if running in Native Client. | 147 // True if running in Native Client. |
146 bool nacl_mode_; | 148 bool nacl_mode_; |
147 | 149 |
148 // String representing the protocol. Used for detecting whether we're running | 150 // String representing the protocol. Used for detecting whether we're running |
149 // with http. | 151 // with http. |
150 std::string protocol_; | 152 std::string protocol_; |
151 | 153 |
| 154 // SSL server port. |
| 155 int ssl_server_port_; |
| 156 |
152 // WebSocket port. | 157 // WebSocket port. |
153 int websocket_port_; | 158 int websocket_port_; |
154 }; | 159 }; |
155 | 160 |
156 #endif // PPAPI_TESTS_TESTING_INSTANCE_H_ | 161 #endif // PPAPI_TESTS_TESTING_INSTANCE_H_ |
OLD | NEW |