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

Side by Side Diff: chrome/test/ppapi/ppapi_test.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: 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 | « no previous file | ppapi/tests/test_case.html » ('j') | ppapi/tests/test_case.html » ('J')
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 "chrome/test/ppapi/ppapi_test.h" 5 #include "chrome/test/ppapi/ppapi_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 net::TestServer ws_server(net::TestServer::TYPE_WS, 212 net::TestServer ws_server(net::TestServer::TYPE_WS,
213 net::TestServer::kLocalhost, 213 net::TestServer::kLocalhost,
214 net::GetWebSocketTestDataDirectory()); 214 net::GetWebSocketTestDataDirectory());
215 // Start the servers in parallel. 215 // Start the servers in parallel.
216 ASSERT_TRUE(http_server.StartInBackground()); 216 ASSERT_TRUE(http_server.StartInBackground());
217 ASSERT_TRUE(ws_server.StartInBackground()); 217 ASSERT_TRUE(ws_server.StartInBackground());
218 // Wait until they are both finished before continuing. 218 // Wait until they are both finished before continuing.
219 ASSERT_TRUE(http_server.BlockUntilStarted()); 219 ASSERT_TRUE(http_server.BlockUntilStarted());
220 ASSERT_TRUE(ws_server.BlockUntilStarted()); 220 ASSERT_TRUE(ws_server.BlockUntilStarted());
221 221
222 std::string host = ws_server.host_port_pair().host();
222 uint16_t port = ws_server.host_port_pair().port(); 223 uint16_t port = ws_server.host_port_pair().port();
223 RunTestURL(GetTestURL(http_server, 224 RunTestURL(GetTestURL(http_server,
224 test_case, 225 test_case,
225 StringPrintf("websocket_port=%d", port))); 226 StringPrintf("websocket_host=%s&websocket_port=%d",
227 host.c_str(),
dmichael (off chromium) 2013/02/13 21:41:13 nit: please line up the 2nd and 3rd params with th
Ryan Sleevi 2013/02/13 21:46:14 Do you need to worry about canonicalizing the host
Takashi Toyoshima 2013/02/14 08:28:28 Thank you for catching this. Yes, I should call Ho
Takashi Toyoshima 2013/02/14 08:28:28 Done.
228 port)));
226 } 229 }
227 230
228 void PPAPITestBase::RunTestIfAudioOutputAvailable( 231 void PPAPITestBase::RunTestIfAudioOutputAvailable(
229 const std::string& test_case) { 232 const std::string& test_case) {
230 RunTest(test_case); 233 RunTest(test_case);
231 } 234 }
232 235
233 void PPAPITestBase::RunTestViaHTTPIfAudioOutputAvailable( 236 void PPAPITestBase::RunTestViaHTTPIfAudioOutputAvailable(
234 const std::string& test_case) { 237 const std::string& test_case) {
235 RunTestViaHTTP(test_case); 238 RunTestViaHTTP(test_case);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 const std::string& base, 354 const std::string& base,
352 const std::string& test_case) { 355 const std::string& test_case) {
353 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), 356 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(),
354 test_case.c_str()); 357 test_case.c_str());
355 } 358 }
356 359
357 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { 360 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() {
358 // The default content setting for the PPAPI broker is ASK. We purposefully 361 // The default content setting for the PPAPI broker is ASK. We purposefully
359 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. 362 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way.
360 } 363 }
OLDNEW
« no previous file with comments | « no previous file | ppapi/tests/test_case.html » ('j') | ppapi/tests/test_case.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698