Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / extensions / extension_message_bubble_browsertest.h
blobc11f8c25c6eb3a74c6465942e45cae21a557bf3f
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h"
12 class ExtensionMessageBubbleBrowserTest
13 : public BrowserActionsBarBrowserTest {
14 protected:
15 enum AnchorPosition {
16 ANCHOR_BROWSER_ACTION,
17 ANCHOR_WRENCH_MENU,
20 ExtensionMessageBubbleBrowserTest();
21 ~ExtensionMessageBubbleBrowserTest() override;
23 // BrowserActionsBarBrowserTest:
24 void SetUpCommandLine(base::CommandLine* command_line) override;
26 // Checks the position of the bubble present in the given |browser|, when the
27 // bubble should be anchored at the given |anchor|.
28 virtual void CheckBubble(Browser* browser, AnchorPosition anchor) = 0;
30 // Closes the bubble present in the given |browser|.
31 virtual void CloseBubble(Browser* browser) = 0;
33 // The following are essentially the different tests, but we can't define the
34 // tests in this file, since it relies on platform-specific implementation
35 // (the above virtual methods).
37 // Tests that an extension bubble will be anchored to an extension action when
38 // there are extensions with actions.
39 void TestBubbleAnchoredToExtensionAction();
41 // Tests that an extension bubble will be anchored to the wrench menu when
42 // there aren't any extensions with actions.
43 // This also tests that the crashes in crbug.com/476426 are fixed.
44 void TestBubbleAnchoredToWrenchMenu();
46 // Tests that an extension bubble will be anchored to the wrench menu if there
47 // are no highlighted extensions, even if there's a benevolent extension with
48 // an action.
49 // Regression test for crbug.com/485614.
50 void TestBubbleAnchoredToWrenchMenuWithOtherAction();
52 // Tests that the extension bubble will show on startup.
53 void PreBubbleShowsOnStartup();
54 void TestBubbleShowsOnStartup();
56 private:
57 scoped_ptr<extensions::FeatureSwitch::ScopedOverride>
58 dev_mode_bubble_override_;
60 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBrowserTest);
63 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BROWSERTEST_H_