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

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: add copyright to echo_wsh.py (copied from PRESUBMIT.py) 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
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | 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 #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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 class TestWebSocketServer { 326 class TestWebSocketServer {
327 public: 327 public:
328 TestWebSocketServer(); 328 TestWebSocketServer();
329 329
330 // Stops the python websocket server if it was already started. 330 // Stops the python websocket server if it was already started.
331 ~TestWebSocketServer(); 331 ~TestWebSocketServer();
332 332
333 // Use a random port, useful for tests that are sharded. Returns the port. 333 // Use a random port, useful for tests that are sharded. Returns the port.
334 int UseRandomPort(); 334 int UseRandomPort();
335 335
336 // Serves with TLS.
337 void UseTLS();
338
336 // Starts the python websocket server using |root_directory|. Returns whether 339 // Starts the python websocket server using |root_directory|. Returns whether
337 // the server was successfully started. 340 // the server was successfully started.
338 bool Start(const FilePath& root_directory); 341 bool Start(const FilePath& root_directory);
339 342
340 private: 343 private:
341 // Sets up PYTHONPATH to run websocket_server.py. 344 // Sets up PYTHONPATH to run websocket_server.py.
342 void SetPythonPath(); 345 void SetPythonPath();
343 346
344 // Creates a CommandLine for invoking the python interpreter. 347 // Creates a CommandLine for invoking the python interpreter.
345 CommandLine* CreatePythonCommandLine(); 348 CommandLine* CreatePythonCommandLine();
(...skipping 12 matching lines...) Expand all
358 FilePath websocket_pid_file_; 361 FilePath websocket_pid_file_;
359 362
360 #if defined(OS_POSIX) 363 #if defined(OS_POSIX)
361 // ProcessHandle used to terminate child process. 364 // ProcessHandle used to terminate child process.
362 base::ProcessHandle process_group_id_; 365 base::ProcessHandle process_group_id_;
363 #elif defined(OS_WIN) 366 #elif defined(OS_WIN)
364 // JobObject used to clean up orphaned child process. 367 // JobObject used to clean up orphaned child process.
365 base::win::ScopedHandle job_handle_; 368 base::win::ScopedHandle job_handle_;
366 #endif 369 #endif
367 370
371 // Holds port number which the python websocket server uses.
368 int port_; 372 int port_;
369 373
374 // If the python websocket server serves with TLS.
375 bool secure_;
376
370 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer); 377 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer);
371 }; 378 };
372 379
373 // A notification observer which quits the message loop when a notification 380 // A notification observer which quits the message loop when a notification
374 // is received. It also records the source and details of the notification. 381 // is received. It also records the source and details of the notification.
375 class TestNotificationObserver : public content::NotificationObserver { 382 class TestNotificationObserver : public content::NotificationObserver {
376 public: 383 public:
377 TestNotificationObserver(); 384 TestNotificationObserver();
378 virtual ~TestNotificationObserver(); 385 virtual ~TestNotificationObserver();
379 386
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 // ui_controls_linux.cc and ui_controls_mac.cc 644 // ui_controls_linux.cc and ui_controls_mac.cc
638 void ClickTask(ui_controls::MouseButton button, 645 void ClickTask(ui_controls::MouseButton button,
639 int state, 646 int state,
640 const base::Closure& followup); 647 const base::Closure& followup);
641 648
642 } // namespace internal 649 } // namespace internal
643 650
644 } // namespace ui_test_utils 651 } // namespace ui_test_utils
645 652
646 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ 653 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698