OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_NOTIFICATIONS_NOTIFICATION_INTERACTIVE_UITEST_SUPPORT_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_INTERACTIVE_UITEST_SUPPORT_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_INTERACTIVE_UITEST_SUPPORT_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_INTERACTIVE_UITEST_SUPPORT_H_ |
7 | 7 |
| 8 #include "base/command_line.h" |
8 #include "base/test/scoped_feature_list.h" | 9 #include "base/test/scoped_feature_list.h" |
9 #include "chrome/browser/permissions/permission_request_manager.h" | 10 #include "chrome/browser/permissions/permission_request_manager.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 11 #include "chrome/test/base/in_process_browser_test.h" |
11 #include "components/content_settings/core/common/content_settings.h" | 12 #include "components/content_settings/core/common/content_settings.h" |
12 | 13 |
13 class MessageCenterChangeObserver { | 14 class MessageCenterChangeObserver { |
14 public: | 15 public: |
15 MessageCenterChangeObserver(); | 16 MessageCenterChangeObserver(); |
16 ~MessageCenterChangeObserver(); | 17 ~MessageCenterChangeObserver(); |
17 | 18 |
18 bool Wait(); | 19 bool Wait(); |
19 | 20 |
20 private: | 21 private: |
21 class Impl; | 22 class Impl; |
22 std::unique_ptr<Impl> impl_; | 23 std::unique_ptr<Impl> impl_; |
23 | 24 |
24 DISALLOW_COPY_AND_ASSIGN(MessageCenterChangeObserver); | 25 DISALLOW_COPY_AND_ASSIGN(MessageCenterChangeObserver); |
25 }; | 26 }; |
26 | 27 |
27 class NotificationsTest : public InProcessBrowserTest { | 28 class NotificationsTest : public InProcessBrowserTest { |
28 public: | 29 public: |
29 NotificationsTest() {} | 30 NotificationsTest() {} |
30 | 31 |
31 protected: | 32 protected: |
| 33 // InProcessBrowserTest overrides. |
| 34 void SetUpDefaultCommandLine(base::CommandLine* command_line) override; |
| 35 |
32 int GetNotificationCount(); | 36 int GetNotificationCount(); |
33 int GetNotificationPopupCount(); | 37 int GetNotificationPopupCount(); |
34 | 38 |
35 void CloseBrowserWindow(Browser* browser); | 39 void CloseBrowserWindow(Browser* browser); |
36 void CrashTab(Browser* browser, int index); | 40 void CrashTab(Browser* browser, int index); |
37 | 41 |
38 void DenyOrigin(const GURL& origin); | 42 void DenyOrigin(const GURL& origin); |
39 void AllowOrigin(const GURL& origin); | 43 void AllowOrigin(const GURL& origin); |
40 void AllowAllOrigins(); | 44 void AllowAllOrigins(); |
41 void SetDefaultContentSetting(ContentSetting setting); | 45 void SetDefaultContentSetting(ContentSetting setting); |
(...skipping 28 matching lines...) Expand all Loading... |
70 private: | 74 private: |
71 void DropOriginPreference(const GURL& origin); | 75 void DropOriginPreference(const GURL& origin); |
72 std::string RequestAndRespondToPermission( | 76 std::string RequestAndRespondToPermission( |
73 Browser* browser, | 77 Browser* browser, |
74 PermissionRequestManager::AutoResponseType bubble_response); | 78 PermissionRequestManager::AutoResponseType bubble_response); |
75 | 79 |
76 base::test::ScopedFeatureList feature_list_; | 80 base::test::ScopedFeatureList feature_list_; |
77 }; | 81 }; |
78 | 82 |
79 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_INTERACTIVE_UITEST_SUPPORT_
H_ | 83 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_INTERACTIVE_UITEST_SUPPORT_
H_ |
OLD | NEW |