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 #include "ppapi/tests/testing_instance.h" | 5 #include "ppapi/tests/testing_instance.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <sstream> | 9 #include <sstream> |
10 #include <vector> | 10 #include <vector> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 bool TestingInstance::Init(uint32_t argc, | 46 bool TestingInstance::Init(uint32_t argc, |
47 const char* argn[], | 47 const char* argn[], |
48 const char* argv[]) { | 48 const char* argv[]) { |
49 for (uint32_t i = 0; i < argc; i++) { | 49 for (uint32_t i = 0; i < argc; i++) { |
50 if (std::strcmp(argn[i], "mode") == 0) { | 50 if (std::strcmp(argn[i], "mode") == 0) { |
51 if (std::strcmp(argv[i], "nacl") == 0) | 51 if (std::strcmp(argv[i], "nacl") == 0) |
52 nacl_mode_ = true; | 52 nacl_mode_ = true; |
53 } else if (std::strcmp(argn[i], "protocol") == 0) { | 53 } else if (std::strcmp(argn[i], "protocol") == 0) { |
54 protocol_ = argv[i]; | 54 protocol_ = argv[i]; |
| 55 } else if (std::strcmp(argn[i], "websocket_host") == 0) { |
| 56 websocket_host_ = argv[i]; |
55 } else if (std::strcmp(argn[i], "websocket_port") == 0) { | 57 } else if (std::strcmp(argn[i], "websocket_port") == 0) { |
56 websocket_port_ = atoi(argv[i]); | 58 websocket_port_ = atoi(argv[i]); |
57 } else if (std::strcmp(argn[i], "ssl_server_port") == 0) { | 59 } else if (std::strcmp(argn[i], "ssl_server_port") == 0) { |
58 ssl_server_port_ = atoi(argv[i]); | 60 ssl_server_port_ = atoi(argv[i]); |
59 } | 61 } |
60 } | 62 } |
61 // Create the proper test case from the argument. | 63 // Create the proper test case from the argument. |
62 for (uint32_t i = 0; i < argc; i++) { | 64 for (uint32_t i = 0; i < argc; i++) { |
63 if (std::strcmp(argn[i], "testcase") == 0) { | 65 if (std::strcmp(argn[i], "testcase") == 0) { |
64 if (argv[i][0] == '\0') | 66 if (argv[i][0] == '\0') |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 } | 279 } |
278 }; | 280 }; |
279 | 281 |
280 namespace pp { | 282 namespace pp { |
281 | 283 |
282 Module* CreateModule() { | 284 Module* CreateModule() { |
283 return new ::Module(); | 285 return new ::Module(); |
284 } | 286 } |
285 | 287 |
286 } // namespace pp | 288 } // namespace pp |
OLD | NEW |