| Index: chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h
|
| diff --git a/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..da4927512712bd1b1632fe7d320d6c7472ab50cd
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h
|
| @@ -0,0 +1,59 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_
|
| +#define CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/extensions/extension_browsertest.h"
|
| +
|
| +namespace extensions {
|
| +class Extension;
|
| +}
|
| +
|
| +class BrowserActionTestUtil;
|
| +
|
| +// A platform-independent browser test class for the browser actions bar.
|
| +class BrowserActionsBarBrowserTest : public ExtensionBrowserTest {
|
| + protected:
|
| + BrowserActionsBarBrowserTest();
|
| + virtual ~BrowserActionsBarBrowserTest();
|
| +
|
| + virtual void SetUpCommandLine(base::CommandLine* command_line) override;
|
| + virtual void SetUpOnMainThread() override;
|
| + virtual void TearDownOnMainThread() override;
|
| +
|
| + BrowserActionTestUtil* browser_actions_bar() {
|
| + return browser_actions_bar_.get();
|
| + }
|
| +
|
| + // Creates three different extensions, each with a browser action, and adds
|
| + // them to associated ExtensionService. These can then be accessed via
|
| + // extension_[a|b|c]().
|
| + void LoadExtensions();
|
| +
|
| + const extensions::Extension* extension_a() const {
|
| + return extension_a_.get();
|
| + }
|
| + const extensions::Extension* extension_b() const {
|
| + return extension_b_.get();
|
| + }
|
| + const extensions::Extension* extension_c() const {
|
| + return extension_c_.get();
|
| + }
|
| +
|
| + private:
|
| + scoped_ptr<BrowserActionTestUtil> browser_actions_bar_;
|
| +
|
| + // Extensions with browser actions used for testing.
|
| + scoped_refptr<const extensions::Extension> extension_a_;
|
| + scoped_refptr<const extensions::Extension> extension_b_;
|
| + scoped_refptr<const extensions::Extension> extension_c_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BrowserActionsBarBrowserTest);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_
|
|
|