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