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

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

Issue 8633004: Stop WebSocker server processes certainly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Win32 impl. Created 9 years, 1 month 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 | chrome/test/base/ui_test_utils.cc » ('j') | chrome/test/base/ui_test_utils.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/scoped_temp_dir.h" 17 #include "base/scoped_temp_dir.h"
18 #include "base/string16.h" 18 #include "base/string16.h"
19 #include "chrome/browser/ui/view_ids.h" 19 #include "chrome/browser/ui/view_ids.h"
20 #include "chrome/test/automation/dom_element_proxy.h" 20 #include "chrome/test/automation/dom_element_proxy.h"
21 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 #include "content/public/browser/notification_details.h" 23 #include "content/public/browser/notification_details.h"
24 #include "content/public/browser/notification_source.h" 24 #include "content/public/browser/notification_source.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 #include "ui/base/keycodes/keyboard_codes.h" 26 #include "ui/base/keycodes/keyboard_codes.h"
27 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
28 #include "webkit/glue/window_open_disposition.h" 28 #include "webkit/glue/window_open_disposition.h"
29 29
30 #if defined(OS_WIN)
31 #include "base/win/scoped_handle.h"
32 #endif
33
30 class AppModalDialog; 34 class AppModalDialog;
31 class BookmarkModel; 35 class BookmarkModel;
32 class Browser; 36 class Browser;
33 class CommandLine; 37 class CommandLine;
34 class ExtensionAction; 38 class ExtensionAction;
35 class FilePath; 39 class FilePath;
36 class GURL; 40 class GURL;
37 class MessageLoop; 41 class MessageLoop;
38 class Profile; 42 class Profile;
39 class RenderViewHost; 43 class RenderViewHost;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // Has the server been started? 328 // Has the server been started?
325 bool started_; 329 bool started_;
326 330
327 // A Scoped temporary directory for holding the python pid file. 331 // A Scoped temporary directory for holding the python pid file.
328 ScopedTempDir temp_dir_; 332 ScopedTempDir temp_dir_;
329 333
330 // Used to close the same python interpreter when server falls out 334 // Used to close the same python interpreter when server falls out
331 // scope. 335 // scope.
332 FilePath websocket_pid_file_; 336 FilePath websocket_pid_file_;
333 337
338 #if defined(OS_WIN)
339 // JobObject used to clean up orphaned child process.
340 base::win::ScopedHandle job_handle_;
341 #endif
342
334 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer); 343 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer);
335 }; 344 };
336 345
337 // A notification observer which quits the message loop when a notification 346 // A notification observer which quits the message loop when a notification
338 // is received. It also records the source and details of the notification. 347 // is received. It also records the source and details of the notification.
339 class TestNotificationObserver : public content::NotificationObserver { 348 class TestNotificationObserver : public content::NotificationObserver {
340 public: 349 public:
341 TestNotificationObserver(); 350 TestNotificationObserver();
342 virtual ~TestNotificationObserver(); 351 virtual ~TestNotificationObserver();
343 352
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 563
555 // Takes a snapshot of the entire page, according to the width and height 564 // Takes a snapshot of the entire page, according to the width and height
556 // properties of the DOM's document. Returns true on success. DOMAutomation 565 // properties of the DOM's document. Returns true on success. DOMAutomation
557 // must be enabled. 566 // must be enabled.
558 bool TakeEntirePageSnapshot(RenderViewHost* rvh, 567 bool TakeEntirePageSnapshot(RenderViewHost* rvh,
559 SkBitmap* bitmap) WARN_UNUSED_RESULT; 568 SkBitmap* bitmap) WARN_UNUSED_RESULT;
560 569
561 } // namespace ui_test_utils 570 } // namespace ui_test_utils
562 571
563 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ 572 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/base/ui_test_utils.cc » ('j') | chrome/test/base/ui_test_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698