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

Side by Side Diff: chrome/test/base/ui_test_utils.h

Issue 9959062: browser_tests to access wss:// after proceeds anyway (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment update Created 8 years, 8 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
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 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_
6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 class TestWebSocketServer { 327 class TestWebSocketServer {
328 public: 328 public:
329 TestWebSocketServer(); 329 TestWebSocketServer();
330 330
331 // Stops the python websocket server if it was already started. 331 // Stops the python websocket server if it was already started.
332 ~TestWebSocketServer(); 332 ~TestWebSocketServer();
333 333
334 // Use a random port, useful for tests that are sharded. Returns the port. 334 // Use a random port, useful for tests that are sharded. Returns the port.
335 int UseRandomPort(); 335 int UseRandomPort();
336 336
337 // Serves with TLS.
338 void UseTLS();
339
337 // Starts the python websocket server using |root_directory|. Returns whether 340 // Starts the python websocket server using |root_directory|. Returns whether
338 // the server was successfully started. 341 // the server was successfully started.
339 bool Start(const FilePath& root_directory); 342 bool Start(const FilePath& root_directory);
340 343
341 private: 344 private:
342 // Sets up PYTHONPATH to run websocket_server.py. 345 // Sets up PYTHONPATH to run websocket_server.py.
343 void SetPythonPath(); 346 void SetPythonPath();
344 347
345 // Creates a CommandLine for invoking the python interpreter. 348 // Creates a CommandLine for invoking the python interpreter.
346 CommandLine* CreatePythonCommandLine(); 349 CommandLine* CreatePythonCommandLine();
(...skipping 12 matching lines...) Expand all
359 FilePath websocket_pid_file_; 362 FilePath websocket_pid_file_;
360 363
361 #if defined(OS_POSIX) 364 #if defined(OS_POSIX)
362 // ProcessHandle used to terminate child process. 365 // ProcessHandle used to terminate child process.
363 base::ProcessHandle process_group_id_; 366 base::ProcessHandle process_group_id_;
364 #elif defined(OS_WIN) 367 #elif defined(OS_WIN)
365 // JobObject used to clean up orphaned child process. 368 // JobObject used to clean up orphaned child process.
366 base::win::ScopedHandle job_handle_; 369 base::win::ScopedHandle job_handle_;
367 #endif 370 #endif
368 371
372 // Holds port number which the python websocket server uses.
369 int port_; 373 int port_;
370 374
375 // If the python websocket server serves with TLS.
376 bool secure_;
377
371 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer); 378 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer);
372 }; 379 };
373 380
374 // A notification observer which quits the message loop when a notification 381 // A notification observer which quits the message loop when a notification
375 // is received. It also records the source and details of the notification. 382 // is received. It also records the source and details of the notification.
376 class TestNotificationObserver : public content::NotificationObserver { 383 class TestNotificationObserver : public content::NotificationObserver {
377 public: 384 public:
378 TestNotificationObserver(); 385 TestNotificationObserver();
379 virtual ~TestNotificationObserver(); 386 virtual ~TestNotificationObserver();
380 387
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 // ui_controls_linux.cc and ui_controls_mac.cc 645 // ui_controls_linux.cc and ui_controls_mac.cc
639 void ClickTask(ui_controls::MouseButton button, 646 void ClickTask(ui_controls::MouseButton button,
640 int state, 647 int state,
641 const base::Closure& followup); 648 const base::Closure& followup);
642 649
643 } // namespace internal 650 } // namespace internal
644 651
645 } // namespace ui_test_utils 652 } // namespace ui_test_utils
646 653
647 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ 654 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698