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

Side by Side Diff: chrome/browser/ui/fullscreen/fullscreen_controller_test.h

Issue 10807047: Create content\public\test\test_utils.h to hold common test classes that are used by unit and brows… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_TEST_H_ 5 #ifndef CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_TEST_H_
6 #define CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_TEST_H_ 6 #define CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_TEST_H_
7 7
8 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h" 8 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h"
9 #include "chrome/common/chrome_notification_types.h" 9 #include "chrome/common/chrome_notification_types.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
11 #include "chrome/test/base/ui_test_utils.h"
12 #include "content/public/browser/notification_service.h" 11 #include "content/public/browser/notification_service.h"
12 #include "content/public/test/test_utils.h"
13 13
14 // Observer for NOTIFICATION_FULLSCREEN_CHANGED notifications. 14 // Observer for NOTIFICATION_FULLSCREEN_CHANGED notifications.
15 class FullscreenNotificationObserver 15 class FullscreenNotificationObserver
16 : public ui_test_utils::WindowedNotificationObserver { 16 : public content::WindowedNotificationObserver {
17 public: 17 public:
18 FullscreenNotificationObserver() : WindowedNotificationObserver( 18 FullscreenNotificationObserver() : WindowedNotificationObserver(
19 chrome::NOTIFICATION_FULLSCREEN_CHANGED, 19 chrome::NOTIFICATION_FULLSCREEN_CHANGED,
20 content::NotificationService::AllSources()) {} 20 content::NotificationService::AllSources()) {}
21 protected: 21 protected:
22 DISALLOW_COPY_AND_ASSIGN(FullscreenNotificationObserver); 22 DISALLOW_COPY_AND_ASSIGN(FullscreenNotificationObserver);
23 }; 23 };
24 24
25 // Observer for NOTIFICATION_MOUSE_LOCK_CHANGED notifications. 25 // Observer for NOTIFICATION_MOUSE_LOCK_CHANGED notifications.
26 class MouseLockNotificationObserver 26 class MouseLockNotificationObserver
27 : public ui_test_utils::WindowedNotificationObserver { 27 : public content::WindowedNotificationObserver {
28 public: 28 public:
29 MouseLockNotificationObserver() : WindowedNotificationObserver( 29 MouseLockNotificationObserver() : WindowedNotificationObserver(
30 chrome::NOTIFICATION_MOUSE_LOCK_CHANGED, 30 chrome::NOTIFICATION_MOUSE_LOCK_CHANGED,
31 content::NotificationService::AllSources()) {} 31 content::NotificationService::AllSources()) {}
32 protected: 32 protected:
33 DISALLOW_COPY_AND_ASSIGN(MouseLockNotificationObserver); 33 DISALLOW_COPY_AND_ASSIGN(MouseLockNotificationObserver);
34 }; 34 };
35 35
36 // Test fixture with convenience functions for fullscreen and mouse lock. 36 // Test fixture with convenience functions for fullscreen and mouse lock.
37 class FullscreenControllerTest : public InProcessBrowserTest { 37 class FullscreenControllerTest : public InProcessBrowserTest {
(...skipping 22 matching lines...) Expand all
60 void GoBack(); 60 void GoBack();
61 void Reload(); 61 void Reload();
62 static const char kFullscreenMouseLockHTML[]; 62 static const char kFullscreenMouseLockHTML[];
63 private: 63 private:
64 void ToggleTabFullscreen_Internal(bool enter_fullscreen, 64 void ToggleTabFullscreen_Internal(bool enter_fullscreen,
65 bool retry_until_success); 65 bool retry_until_success);
66 DISALLOW_COPY_AND_ASSIGN(FullscreenControllerTest); 66 DISALLOW_COPY_AND_ASSIGN(FullscreenControllerTest);
67 }; 67 };
68 68
69 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_TEST_H_ 69 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698