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

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

Issue 9791064: Disable failing test (ExtensionInstallUIBrowserTest.TestThemeInstallUndoResetsToDefault) on Linux d… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | no next file » | 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) 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"
(...skipping 20 matching lines...) Expand all
31 ASSERT_TRUE(delegate); 31 ASSERT_TRUE(delegate);
32 delegate->Cancel(); 32 delegate->Cancel();
33 ASSERT_EQ(0U, infobar_helper->infobar_count()); 33 ASSERT_EQ(0U, infobar_helper->infobar_count());
34 } 34 }
35 35
36 const Extension* GetTheme() const { 36 const Extension* GetTheme() const {
37 return ThemeServiceFactory::GetThemeForProfile(browser()->profile()); 37 return ThemeServiceFactory::GetThemeForProfile(browser()->profile());
38 } 38 }
39 }; 39 };
40 40
41 #if defined(OS_LINUX)
42 // Fails consistently on bot chromium.chromiumos \ Linux.
43 // See: http://crbug.com/120647.
44 #define MAYBE_TestThemeInstallUndoResetsToDefault DISABLED_TestThemeInstallUndoR esetsToDefault
45 #else
46 #define MAYBE_TestThemeInstallUndoResetsToDefault TestThemeInstallUndoResetsToDe fault
47 #endif
48
41 IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, 49 IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
42 TestThemeInstallUndoResetsToDefault) { 50 MAYBE_TestThemeInstallUndoResetsToDefault) {
43 // Install theme once and undo to verify we go back to default theme. 51 // Install theme once and undo to verify we go back to default theme.
44 FilePath theme_crx = PackExtension(test_data_dir_.AppendASCII("theme")); 52 FilePath theme_crx = PackExtension(test_data_dir_.AppendASCII("theme"));
45 ASSERT_TRUE(InstallExtensionWithUI(theme_crx, 1)); 53 ASSERT_TRUE(InstallExtensionWithUI(theme_crx, 1));
46 const Extension* theme = GetTheme(); 54 const Extension* theme = GetTheme();
47 ASSERT_TRUE(theme); 55 ASSERT_TRUE(theme);
48 std::string theme_id = theme->id(); 56 std::string theme_id = theme->id();
49 VerifyThemeInfoBarAndUndoInstall(); 57 VerifyThemeInfoBarAndUndoInstall();
50 ASSERT_EQ(NULL, GetTheme()); 58 ASSERT_EQ(NULL, GetTheme());
51 59
52 // Set the same theme twice and undo to verify we go back to default theme. 60 // Set the same theme twice and undo to verify we go back to default theme.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (NewTabUI::ShouldShowApps()) { 130 if (NewTabUI::ShouldShowApps()) {
123 EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count()); 131 EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count());
124 WebContents* web_contents = browser()->GetSelectedWebContents(); 132 WebContents* web_contents = browser()->GetSelectedWebContents();
125 ASSERT_TRUE(web_contents); 133 ASSERT_TRUE(web_contents);
126 EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(), 134 EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(),
127 "chrome://newtab/", false)); 135 "chrome://newtab/", false));
128 } else { 136 } else {
129 // TODO(xiyuan): Figure out how to test extension installed bubble? 137 // TODO(xiyuan): Figure out how to test extension installed bubble?
130 } 138 }
131 } 139 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698