| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Checks that there is no active bubble for the given |browser|. | 46 // Checks that there is no active bubble for the given |browser|. |
| 47 // We specify whether or not the toolbar model should be highlighting or there | 47 // We specify whether or not the toolbar model should be highlighting or there |
| 48 // is a bubble active since another browser window may have an active bubble. | 48 // is a bubble active since another browser window may have an active bubble. |
| 49 void CheckBubbleIsNotPresent(Browser* browser, | 49 void CheckBubbleIsNotPresent(Browser* browser, |
| 50 bool should_profile_have_bubble, | 50 bool should_profile_have_bubble, |
| 51 bool should_be_highlighting); | 51 bool should_be_highlighting); |
| 52 // Performs the platform-specific checks. | 52 // Performs the platform-specific checks. |
| 53 virtual void CheckBubbleIsNotPresentNative(Browser* browser) = 0; | 53 virtual void CheckBubbleIsNotPresentNative(Browser* browser) = 0; |
| 54 | 54 |
| 55 // Clicks on the corresponding button in the bubble. |
| 56 virtual void ClickLearnMoreButton(Browser* browser) = 0; |
| 57 virtual void ClickActionButton(Browser* browser) = 0; |
| 58 virtual void ClickDismissButton(Browser* browser) = 0; |
| 59 |
| 55 // Adds a new extension that uses the chrome_settings_overrides api to | 60 // Adds a new extension that uses the chrome_settings_overrides api to |
| 56 // override a setting specified in |settings_override_value|. | 61 // override a setting specified in |settings_override_value|. |
| 57 void AddSettingsOverrideExtension(const std::string& settings_override_value); | 62 void AddSettingsOverrideExtension(const std::string& settings_override_value); |
| 58 | 63 |
| 59 // The following are essentially the different tests, but we can't define the | 64 // The following are essentially the different tests, but we can't define the |
| 60 // tests in this file, since it relies on platform-specific implementation | 65 // tests in this file, since it relies on platform-specific implementation |
| 61 // (the above virtual methods). | 66 // (the above virtual methods). |
| 62 | 67 |
| 63 // Tests that an extension bubble will be anchored to an extension action when | 68 // Tests that an extension bubble will be anchored to an extension action when |
| 64 // there are extensions with actions. | 69 // there are extensions with actions. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void TestControlledHomeBubbleShown(); | 103 void TestControlledHomeBubbleShown(); |
| 99 | 104 |
| 100 // Tests that the bubble indicating an extension is controlling a user's | 105 // Tests that the bubble indicating an extension is controlling a user's |
| 101 // search engine is shown. | 106 // search engine is shown. |
| 102 void TestControlledSearchBubbleShown(); | 107 void TestControlledSearchBubbleShown(); |
| 103 | 108 |
| 104 // Tests that having multiple windows, all of which could be vying to show a | 109 // Tests that having multiple windows, all of which could be vying to show a |
| 105 // warning bubble, behaves properly. | 110 // warning bubble, behaves properly. |
| 106 void TestBubbleWithMultipleWindows(); | 111 void TestBubbleWithMultipleWindows(); |
| 107 | 112 |
| 113 // Tests clicking on the corresponding button in the bubble view. The logic |
| 114 // for these is tested more thoroughly in the unit tests, but this ensures |
| 115 // that nothing goes wrong end-to-end. |
| 116 void TestClickingLearnMoreButton(); |
| 117 void TestClickingActionButton(); |
| 118 void TestClickingDismissButton(); |
| 119 |
| 108 private: | 120 private: |
| 109 std::unique_ptr<extensions::FeatureSwitch::ScopedOverride> | 121 std::unique_ptr<extensions::FeatureSwitch::ScopedOverride> |
| 110 dev_mode_bubble_override_; | 122 dev_mode_bubble_override_; |
| 111 | 123 |
| 112 // The backing directory for a custom extension loaded during a test. Null if | 124 // The backing directory for a custom extension loaded during a test. Null if |
| 113 // no custom extension is loaded. | 125 // no custom extension is loaded. |
| 114 std::unique_ptr<extensions::TestExtensionDir> custom_extension_dir_; | 126 std::unique_ptr<extensions::TestExtensionDir> custom_extension_dir_; |
| 115 | 127 |
| 116 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBrowserTest); | 128 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBrowserTest); |
| 117 }; | 129 }; |
| 118 | 130 |
| 119 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_ | 131 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_ |
| OLD | NEW |