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

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

Issue 1225093003: mac: Flush the autorelease pool after making a browser window in browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_test_base
Patch Set: Comments from jhawkins, round two. Created 5 years, 5 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/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/prefs/scoped_user_pref_update.h" 6 #include "base/prefs/scoped_user_pref_update.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_web_ui.h" 9 #include "chrome/browser/extensions/extension_web_ui.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Hangy: http://crbug.com/70511 71 // Hangy: http://crbug.com/70511
72 #define MAYBE_OverrideNewTabIncognito DISABLED_OverrideNewTabIncognito 72 #define MAYBE_OverrideNewTabIncognito DISABLED_OverrideNewTabIncognito
73 #else 73 #else
74 #define MAYBE_OverrideNewTabIncognito OverrideNewTabIncognito 74 #define MAYBE_OverrideNewTabIncognito OverrideNewTabIncognito
75 #endif 75 #endif
76 IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, MAYBE_OverrideNewTabIncognito) { 76 IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, MAYBE_OverrideNewTabIncognito) {
77 ASSERT_TRUE(RunExtensionTest("override/newtab")) << message_; 77 ASSERT_TRUE(RunExtensionTest("override/newtab")) << message_;
78 78
79 // Navigate an incognito tab to the new tab page. We should get the actual 79 // Navigate an incognito tab to the new tab page. We should get the actual
80 // new tab page because we can't load chrome-extension URLs in incognito. 80 // new tab page because we can't load chrome-extension URLs in incognito.
81 Browser* otr_browser = ui_test_utils::OpenURLOffTheRecord( 81 Browser* otr_browser =
82 browser()->profile(), GURL("chrome://newtab/")); 82 OpenURLOffTheRecord(browser()->profile(), GURL("chrome://newtab/"));
83 WebContents* tab = otr_browser->tab_strip_model()->GetActiveWebContents(); 83 WebContents* tab = otr_browser->tab_strip_model()->GetActiveWebContents();
84 ASSERT_TRUE(tab->GetController().GetVisibleEntry()); 84 ASSERT_TRUE(tab->GetController().GetVisibleEntry());
85 EXPECT_FALSE(tab->GetController().GetVisibleEntry()->GetURL(). 85 EXPECT_FALSE(tab->GetController().GetVisibleEntry()->GetURL().
86 SchemeIs(extensions::kExtensionScheme)); 86 SchemeIs(extensions::kExtensionScheme));
87 } 87 }
88 88
89 // Times out consistently on Win, http://crbug.com/45173. 89 // Times out consistently on Win, http://crbug.com/45173.
90 #if defined(OS_WIN) 90 #if defined(OS_WIN)
91 #define MAYBE_OverrideHistory DISABLED_OverrideHistory 91 #define MAYBE_OverrideHistory DISABLED_OverrideHistory
92 #else 92 #else
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 ExtensionWebUI::kExtensionURLOverrides); 135 ExtensionWebUI::kExtensionURLOverrides);
136 update.Get()->Set("history", list); 136 update.Get()->Set("history", list);
137 } 137 }
138 138
139 ASSERT_FALSE(CheckHistoryOverridesContainsNoDupes()); 139 ASSERT_FALSE(CheckHistoryOverridesContainsNoDupes());
140 140
141 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("override/history"))); 141 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("override/history")));
142 142
143 ASSERT_TRUE(CheckHistoryOverridesContainsNoDupes()); 143 ASSERT_TRUE(CheckHistoryOverridesContainsNoDupes());
144 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698