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

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

Issue 6209001: Change DCHECK in BookmarkBarGtk to DLOG and return. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: improve Observe() check, revert CreateAllBookmarkButtons to DCHECK Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/bookmark_bar_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 #include "chrome/browser/extensions/extension_service.h" 6 #include "chrome/browser/extensions/extension_service.h"
7 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" 7 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/tab_contents/tab_contents.h" 9 #include "chrome/browser/tab_contents/tab_contents.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 15 matching lines...) Expand all
26 ASSERT_TRUE(tab_contents); 26 ASSERT_TRUE(tab_contents);
27 ASSERT_EQ(1, tab_contents->infobar_delegate_count()); 27 ASSERT_EQ(1, tab_contents->infobar_delegate_count());
28 ThemeInstalledInfoBarDelegate* delegate = tab_contents-> 28 ThemeInstalledInfoBarDelegate* delegate = tab_contents->
29 GetInfoBarDelegateAt(0)->AsThemePreviewInfobarDelegate(); 29 GetInfoBarDelegateAt(0)->AsThemePreviewInfobarDelegate();
30 ASSERT_TRUE(delegate); 30 ASSERT_TRUE(delegate);
31 delegate->Cancel(); 31 delegate->Cancel();
32 ASSERT_EQ(0, tab_contents->infobar_delegate_count()); 32 ASSERT_EQ(0, tab_contents->infobar_delegate_count());
33 } 33 }
34 }; 34 };
35 35
36 // Crashy, http://crbug.com/44548. 36 // Crashy, http://crbug.com/44548.
Paweł Hajdan Jr. 2011/01/21 09:13:44 nit: Please also remove the comment.
Tessa MacDuff 2011/01/21 21:33:02 Done.
37 IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, 37 IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
38 DISABLED_TestThemeInstallUndoResetsToDefault) { 38 TestThemeInstallUndoResetsToDefault) {
39 // Install theme once and undo to verify we go back to default theme. 39 // Install theme once and undo to verify we go back to default theme.
40 FilePath theme_path = test_data_dir_.AppendASCII("theme.crx"); 40 FilePath theme_path = test_data_dir_.AppendASCII("theme.crx");
41 ASSERT_TRUE(InstallExtensionWithUI(theme_path, 1)); 41 ASSERT_TRUE(InstallExtensionWithUI(theme_path, 1));
42 const Extension* theme = browser()->profile()->GetTheme(); 42 const Extension* theme = browser()->profile()->GetTheme();
43 ASSERT_TRUE(theme); 43 ASSERT_TRUE(theme);
44 ASSERT_EQ(theme_crx, theme->id()); 44 ASSERT_EQ(theme_crx, theme->id());
45 VerifyThemeInfoBarAndUndoInstall(); 45 VerifyThemeInfoBarAndUndoInstall();
46 ASSERT_EQ(NULL, browser()->profile()->GetTheme()); 46 ASSERT_EQ(NULL, browser()->profile()->GetTheme());
47 47
48 // Set the same theme twice and undo to verify we go back to default theme. 48 // Set the same theme twice and undo to verify we go back to default theme.
49 // We set the |expected_change| to zero in these 'InstallExtensionWithUI' 49 // We set the |expected_change| to zero in these 'InstallExtensionWithUI'
50 // calls since the theme has already been installed above and this is an 50 // calls since the theme has already been installed above and this is an
51 // overinstall to set the active theme. 51 // overinstall to set the active theme.
52 ASSERT_TRUE(InstallExtensionWithUI(theme_path, 0)); 52 ASSERT_TRUE(InstallExtensionWithUI(theme_path, 0));
53 theme = browser()->profile()->GetTheme(); 53 theme = browser()->profile()->GetTheme();
54 ASSERT_TRUE(theme); 54 ASSERT_TRUE(theme);
55 ASSERT_EQ(theme_crx, theme->id()); 55 ASSERT_EQ(theme_crx, theme->id());
56 ASSERT_TRUE(InstallExtensionWithUI(theme_path, 0)); 56 ASSERT_TRUE(InstallExtensionWithUI(theme_path, 0));
57 theme = browser()->profile()->GetTheme(); 57 theme = browser()->profile()->GetTheme();
58 ASSERT_TRUE(theme); 58 ASSERT_TRUE(theme);
59 ASSERT_EQ(theme_crx, theme->id()); 59 ASSERT_EQ(theme_crx, theme->id());
60 VerifyThemeInfoBarAndUndoInstall(); 60 VerifyThemeInfoBarAndUndoInstall();
61 ASSERT_EQ(NULL, browser()->profile()->GetTheme()); 61 ASSERT_EQ(NULL, browser()->profile()->GetTheme());
62 } 62 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/bookmark_bar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698