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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |