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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/extensions/browser_action_test_util.h" | 6 #include "chrome/browser/extensions/browser_action_test_util.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_browser_event_router.h" | 8 #include "chrome/browser/extensions/extension_browser_event_router.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_tab_util.h" | 10 #include "chrome/browser/extensions/extension_tab_util.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/sessions/restore_tab_helper.h" | 12 #include "chrome/browser/sessions/restore_tab_helper.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" |
15 #include "chrome/browser/ui/omnibox/location_bar.h" | 15 #include "chrome/browser/ui/omnibox/location_bar.h" |
16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
19 #include "chrome/common/extensions/extension_action.h" | 19 #include "chrome/common/extensions/extension_action.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 20 #include "chrome/test/base/ui_test_utils.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 | 22 |
23 // These are a mash-up of the tests from from page_actions_apitest.cc and | 23 // These are a mash-up of the tests from from page_actions_apitest.cc and |
24 // browser_actions_apitest.cc. | 24 // browser_actions_apitest.cc. |
25 | 25 |
| 26 using extensions::Extension; |
| 27 |
26 namespace { | 28 namespace { |
27 | 29 |
28 class PageAsBrowserActionApiTest : public ExtensionApiTest { | 30 class PageAsBrowserActionApiTest : public ExtensionApiTest { |
29 public: | 31 public: |
30 PageAsBrowserActionApiTest() {} | 32 PageAsBrowserActionApiTest() {} |
31 virtual ~PageAsBrowserActionApiTest() {} | 33 virtual ~PageAsBrowserActionApiTest() {} |
32 | 34 |
33 void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 35 void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
34 ExtensionApiTest::SetUpCommandLine(command_line); | 36 ExtensionApiTest::SetUpCommandLine(command_line); |
35 command_line->AppendSwitch(switches::kEnableBrowserActionsForAll); | 37 command_line->AppendSwitch(switches::kEnableBrowserActionsForAll); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 const Extension* extension = GetSingleLoadedExtension(); | 167 const Extension* extension = GetSingleLoadedExtension(); |
166 ASSERT_TRUE(extension) << message_; | 168 ASSERT_TRUE(extension) << message_; |
167 | 169 |
168 ResultCatcher catcher; | 170 ResultCatcher catcher; |
169 ui_test_utils::NavigateToURL(browser(), | 171 ui_test_utils::NavigateToURL(browser(), |
170 GURL(extension->GetResourceURL("update.html"))); | 172 GURL(extension->GetResourceURL("update.html"))); |
171 ASSERT_TRUE(catcher.GetNextResult()); | 173 ASSERT_TRUE(catcher.GetNextResult()); |
172 } | 174 } |
173 | 175 |
174 } | 176 } |
OLD | NEW |