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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 i != urls.end(); | 282 i != urls.end(); |
283 ++i) { | 283 ++i) { |
284 if ((*i)->prepopulate_id() != 0) | 284 if ((*i)->prepopulate_id() != 0) |
285 model->Remove(*i); | 285 model->Remove(*i); |
286 } | 286 } |
287 } | 287 } |
288 | 288 |
289 void AddHistoryEntry(const TestHistoryEntry& entry, const Time& time) { | 289 void AddHistoryEntry(const TestHistoryEntry& entry, const Time& time) { |
290 Profile* profile = browser()->profile(); | 290 Profile* profile = browser()->profile(); |
291 HistoryService* history_service = HistoryServiceFactory::GetForProfile( | 291 HistoryService* history_service = HistoryServiceFactory::GetForProfile( |
292 profile, Profile::EXPLICIT_ACCESS); | 292 profile, ServiceAccessType::EXPLICIT_ACCESS); |
293 ASSERT_TRUE(history_service); | 293 ASSERT_TRUE(history_service); |
294 | 294 |
295 if (!history_service->BackendLoaded()) { | 295 if (!history_service->BackendLoaded()) { |
296 observer_.Add(history_service); | 296 observer_.Add(history_service); |
297 content::RunMessageLoop(); | 297 content::RunMessageLoop(); |
298 } | 298 } |
299 | 299 |
300 BookmarkModel* bookmark_model = | 300 BookmarkModel* bookmark_model = |
301 BookmarkModelFactory::GetForProfile(profile); | 301 BookmarkModelFactory::GetForProfile(profile); |
302 ASSERT_TRUE(bookmark_model); | 302 ASSERT_TRUE(bookmark_model); |
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 omnibox_view->Update(); | 1858 omnibox_view->Update(); |
1859 EXPECT_EQ(url_c, omnibox_view->GetText()); | 1859 EXPECT_EQ(url_c, omnibox_view->GetText()); |
1860 } | 1860 } |
1861 | 1861 |
1862 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscDisablesSearchTermReplacement) { | 1862 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscDisablesSearchTermReplacement) { |
1863 browser()->toolbar_model()->set_url_replacement_enabled(true); | 1863 browser()->toolbar_model()->set_url_replacement_enabled(true); |
1864 chrome::FocusLocationBar(browser()); | 1864 chrome::FocusLocationBar(browser()); |
1865 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, 0)); | 1865 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, 0)); |
1866 EXPECT_FALSE(browser()->toolbar_model()->url_replacement_enabled()); | 1866 EXPECT_FALSE(browser()->toolbar_model()->url_replacement_enabled()); |
1867 } | 1867 } |
OLD | NEW |