Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/extensions/extension_install_ui_browsertest.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 2 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/extensions/extension_browsertest.h" 6 #include "chrome/browser/extensions/extension_browsertest.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" 8 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
9 #include "chrome/browser/infobars/infobar_tab_helper.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/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
13 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 13 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
14 #include "chrome/browser/themes/theme_service_factory.h" 14 #include "chrome/browser/themes/theme_service_factory.h"
15 #include "chrome/test/base/ui_test_utils.h" 15 #include "chrome/test/base/ui_test_utils.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 17
18 using content::WebContents; 18 using content::WebContents;
19 using extensions::Extension;
19 20
20 class ExtensionInstallUIBrowserTest : public ExtensionBrowserTest { 21 class ExtensionInstallUIBrowserTest : public ExtensionBrowserTest {
21 public: 22 public:
22 // Checks that a theme info bar is currently visible and issues an undo to 23 // Checks that a theme info bar is currently visible and issues an undo to
23 // revert to the previous theme. 24 // revert to the previous theme.
24 void VerifyThemeInfoBarAndUndoInstall() { 25 void VerifyThemeInfoBarAndUndoInstall() {
25 TabContentsWrapper* tab = browser()->GetSelectedTabContentsWrapper(); 26 TabContentsWrapper* tab = browser()->GetSelectedTabContentsWrapper();
26 ASSERT_TRUE(tab); 27 ASSERT_TRUE(tab);
27 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); 28 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
28 ASSERT_EQ(1U, infobar_helper->infobar_count()); 29 ASSERT_EQ(1U, infobar_helper->infobar_count());
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (NewTabUI::ShouldShowApps()) { 131 if (NewTabUI::ShouldShowApps()) {
131 EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count()); 132 EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count());
132 WebContents* web_contents = browser()->GetSelectedWebContents(); 133 WebContents* web_contents = browser()->GetSelectedWebContents();
133 ASSERT_TRUE(web_contents); 134 ASSERT_TRUE(web_contents);
134 EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(), 135 EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(),
135 "chrome://newtab/", false)); 136 "chrome://newtab/", false));
136 } else { 137 } else {
137 // TODO(xiyuan): Figure out how to test extension installed bubble? 138 // TODO(xiyuan): Figure out how to test extension installed bubble?
138 } 139 }
139 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698