Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: ppapi/tests/testing_instance.cc

Issue 12252004: PPAPI/WS: use server providing hostname as test serevr hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/testing_instance.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ppapi/tests/testing_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698