| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" | 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" |
| 10 #include "chrome/browser/extensions/browser_action_test_util.h" | 10 #include "chrome/browser/extensions/browser_action_test_util.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 116 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 117 return GetBrowserActionsBar()->HasPopup(); | 117 return GetBrowserActionsBar()->HasPopup(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 ExtensionAction* GetBrowserAction(const Extension& extension) { | 120 ExtensionAction* GetBrowserAction(const Extension& extension) { |
| 121 return ExtensionActionManager::Get(browser()->profile())-> | 121 return ExtensionActionManager::Get(browser()->profile())-> |
| 122 GetBrowserAction(extension); | 122 GetBrowserAction(extension); |
| 123 } | 123 } |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 scoped_ptr<BrowserActionTestUtil> browser_action_test_util_; | 126 std::unique_ptr<BrowserActionTestUtil> browser_action_test_util_; |
| 127 | 127 |
| 128 DISALLOW_COPY_AND_ASSIGN(BrowserActionApiTest); | 128 DISALLOW_COPY_AND_ASSIGN(BrowserActionApiTest); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, Basic) { | 131 IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, Basic) { |
| 132 ASSERT_TRUE(embedded_test_server()->Start()); | 132 ASSERT_TRUE(embedded_test_server()->Start()); |
| 133 ASSERT_TRUE(RunExtensionTest("browser_action/basics")) << message_; | 133 ASSERT_TRUE(RunExtensionTest("browser_action/basics")) << message_; |
| 134 const Extension* extension = GetSingleLoadedExtension(); | 134 const Extension* extension = GetSingleLoadedExtension(); |
| 135 ASSERT_TRUE(extension) << message_; | 135 ASSERT_TRUE(extension) << message_; |
| 136 | 136 |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 test_data_dir_.AppendASCII("browser_action/open_popup_on_reply"))); | 790 test_data_dir_.AppendASCII("browser_action/open_popup_on_reply"))); |
| 791 EXPECT_TRUE(listener.WaitUntilSatisfied()); | 791 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
| 792 | 792 |
| 793 ResultCatcher catcher; | 793 ResultCatcher catcher; |
| 794 listener.Reply(std::string()); | 794 listener.Reply(std::string()); |
| 795 EXPECT_TRUE(catcher.GetNextResult()) << message_; | 795 EXPECT_TRUE(catcher.GetNextResult()) << message_; |
| 796 } | 796 } |
| 797 | 797 |
| 798 } // namespace | 798 } // namespace |
| 799 } // namespace extensions | 799 } // namespace extensions |
| OLD | NEW |