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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include "chrome/browser/extensions/browser_action_test_util.h" | 11 #include "chrome/browser/extensions/browser_action_test_util.h" |
12 #include "chrome/browser/extensions/extension_apitest.h" | 12 #include "chrome/browser/extensions/extension_apitest.h" |
13 #include "chrome/browser/extensions/extension_browser_event_router.h" | 13 #include "chrome/browser/extensions/extension_browser_event_router.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "chrome/browser/extensions/extension_tab_util.h" | 15 #include "chrome/browser/extensions/extension_tab_util.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/browser_window.h" | 18 #include "chrome/browser/ui/browser_window.h" |
19 #include "chrome/common/chrome_notification_types.h" | 19 #include "chrome/common/chrome_notification_types.h" |
20 #include "chrome/common/extensions/extension_action.h" | 20 #include "chrome/common/extensions/extension_action.h" |
21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
22 #include "chrome/test/base/ui_test_utils.h" | 22 #include "chrome/test/base/ui_test_utils.h" |
23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
25 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
26 #include "ui/gfx/size.h" | 26 #include "ui/gfx/size.h" |
27 | 27 |
28 using content::WebContents; | 28 using content::WebContents; |
| 29 using extensions::Extension; |
29 | 30 |
30 class BrowserActionApiTest : public ExtensionApiTest { | 31 class BrowserActionApiTest : public ExtensionApiTest { |
31 public: | 32 public: |
32 BrowserActionApiTest() {} | 33 BrowserActionApiTest() {} |
33 virtual ~BrowserActionApiTest() {} | 34 virtual ~BrowserActionApiTest() {} |
34 | 35 |
35 protected: | 36 protected: |
36 BrowserActionTestUtil GetBrowserActionsBar() { | 37 BrowserActionTestUtil GetBrowserActionsBar() { |
37 return BrowserActionTestUtil(browser()); | 38 return BrowserActionTestUtil(browser()); |
38 } | 39 } |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 ResultCatcher catcher; | 459 ResultCatcher catcher; |
459 ui_test_utils::NavigateToURL(browser(), | 460 ui_test_utils::NavigateToURL(browser(), |
460 GURL(extension->GetResourceURL("update.html"))); | 461 GURL(extension->GetResourceURL("update.html"))); |
461 ASSERT_TRUE(catcher.GetNextResult()); | 462 ASSERT_TRUE(catcher.GetNextResult()); |
462 | 463 |
463 // Test the getters for a specific tab. | 464 // Test the getters for a specific tab. |
464 ui_test_utils::NavigateToURL(browser(), | 465 ui_test_utils::NavigateToURL(browser(), |
465 GURL(extension->GetResourceURL("update2.html"))); | 466 GURL(extension->GetResourceURL("update2.html"))); |
466 ASSERT_TRUE(catcher.GetNextResult()); | 467 ASSERT_TRUE(catcher.GetNextResult()); |
467 } | 468 } |
OLD | NEW |