| 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/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "chrome/browser/api/infobars/infobar_tab_helper.h" |
| 6 #include "chrome/browser/extensions/extension_browsertest.h" | 7 #include "chrome/browser/extensions/extension_browsertest.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" | 9 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" |
| 9 #include "chrome/browser/infobars/infobar_tab_helper.h" | |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/themes/theme_service_factory.h" |
| 11 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_finder.h" | 13 #include "chrome/browser/ui/browser_finder.h" |
| 13 #include "chrome/browser/ui/browser_tabstrip.h" | 14 #include "chrome/browser/ui/browser_tabstrip.h" |
| 14 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 15 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 15 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 16 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 16 #include "chrome/browser/themes/theme_service_factory.h" | |
| 17 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 19 | 19 |
| 20 using content::WebContents; | 20 using content::WebContents; |
| 21 using extensions::Extension; | 21 using extensions::Extension; |
| 22 | 22 |
| 23 class ExtensionInstallUIBrowserTest : public ExtensionBrowserTest { | 23 class ExtensionInstallUIBrowserTest : public ExtensionBrowserTest { |
| 24 public: | 24 public: |
| 25 // Checks that a theme info bar is currently visible and issues an undo to | 25 // Checks that a theme info bar is currently visible and issues an undo to |
| 26 // revert to the previous theme. | 26 // revert to the previous theme. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 if (NewTabUI::ShouldShowApps()) { | 136 if (NewTabUI::ShouldShowApps()) { |
| 137 EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count()); | 137 EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count()); |
| 138 WebContents* web_contents = chrome::GetActiveWebContents(browser()); | 138 WebContents* web_contents = chrome::GetActiveWebContents(browser()); |
| 139 ASSERT_TRUE(web_contents); | 139 ASSERT_TRUE(web_contents); |
| 140 EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(), | 140 EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(), |
| 141 "chrome://newtab/", false)); | 141 "chrome://newtab/", false)); |
| 142 } else { | 142 } else { |
| 143 // TODO(xiyuan): Figure out how to test extension installed bubble? | 143 // TODO(xiyuan): Figure out how to test extension installed bubble? |
| 144 } | 144 } |
| 145 } | 145 } |
| OLD | NEW |