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

Side by Side Diff: chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h

Issue 640423003: Create a cross-platform browsertest for the browser actions bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/extension_browsertest.h"
11
12 namespace extensions {
13 class Extension;
14 }
15
16 class BrowserActionTestUtil;
17
18 // A platform-independent browser test class for the browser actions bar.
19 class BrowserActionsBarBrowserTest : public ExtensionBrowserTest {
20 protected:
21 BrowserActionsBarBrowserTest();
22 virtual ~BrowserActionsBarBrowserTest();
23
24 virtual void SetUpCommandLine(base::CommandLine* command_line) override;
25 virtual void SetUpOnMainThread() override;
26 virtual void TearDownOnMainThread() override;
27
28 BrowserActionTestUtil* browser_actions_bar() {
29 return browser_actions_bar_.get();
30 }
31
32 // Creates three different extensions, each with a browser action, and adds
33 // them to associated ExtensionService. These can then be accessed via
34 // extension_[a|b|c]().
35 void LoadExtensions();
36
37 const extensions::Extension* extension_a() const {
38 return extension_a_.get();
39 }
40 const extensions::Extension* extension_b() const {
41 return extension_b_.get();
42 }
43 const extensions::Extension* extension_c() const {
44 return extension_c_.get();
45 }
46
47 private:
48 scoped_ptr<BrowserActionTestUtil> browser_actions_bar_;
49
50 // Extensions with browser actions used for testing.
51 scoped_refptr<const extensions::Extension> extension_a_;
52 scoped_refptr<const extensions::Extension> extension_b_;
53 scoped_refptr<const extensions::Extension> extension_c_;
54 };
Peter Kasting 2014/10/10 20:32:51 Nit: DISALLOW_COPY_AND_ASSIGN
Devlin 2014/10/10 20:40:23 Done.
55
56 #endif // CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698