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