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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc

Issue 16951015: Remove TextDatabase from the history service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_fts
Patch Set: Created 7 years, 6 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 ASSERT_TRUE(bookmark_model); 313 ASSERT_TRUE(bookmark_model);
314 ui_test_utils::WaitForBookmarkModelToLoad(bookmark_model); 314 ui_test_utils::WaitForBookmarkModelToLoad(bookmark_model);
315 315
316 GURL url(entry.url); 316 GURL url(entry.url);
317 // Add everything in order of time. We don't want to have a time that 317 // Add everything in order of time. We don't want to have a time that
318 // is "right now" or it will nondeterministically appear in the results. 318 // is "right now" or it will nondeterministically appear in the results.
319 history_service->AddPageWithDetails(url, UTF8ToUTF16(entry.title), 319 history_service->AddPageWithDetails(url, UTF8ToUTF16(entry.title),
320 entry.visit_count, 320 entry.visit_count,
321 entry.typed_count, time, false, 321 entry.typed_count, time, false,
322 history::SOURCE_BROWSED); 322 history::SOURCE_BROWSED);
323 history_service->SetPageContents(url, UTF8ToUTF16(entry.body));
324 if (entry.starred) 323 if (entry.starred)
325 bookmark_utils::AddIfNotBookmarked(bookmark_model, url, string16()); 324 bookmark_utils::AddIfNotBookmarked(bookmark_model, url, string16());
326 // Wait at least for the AddPageWithDetails() call to finish. 325 // Wait at least for the AddPageWithDetails() call to finish.
327 { 326 {
328 content::NotificationRegistrar registrar; 327 content::NotificationRegistrar registrar;
329 registrar.Add(this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED, 328 registrar.Add(this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED,
330 content::Source<Profile>(profile)); 329 content::Source<Profile>(profile));
331 content::RunMessageLoop(); 330 content::RunMessageLoop();
332 // We don't want to return until all observers have processed this 331 // We don't want to return until all observers have processed this
333 // notification, because some (e.g. the in-memory history database) may do 332 // notification, because some (e.g. the in-memory history database) may do
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1833 ASSERT_EQ(5U, end); 1832 ASSERT_EQ(5U, end);
1834 1833
1835 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); 1834 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER);
1836 ASSERT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX)); 1835 ASSERT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
1837 1836
1838 omnibox_view->GetSelectionBounds(&start, &end); 1837 omnibox_view->GetSelectionBounds(&start, &end);
1839 ASSERT_EQ(0U, start); 1838 ASSERT_EQ(0U, start);
1840 ASSERT_EQ(0U, end); 1839 ASSERT_EQ(0U, end);
1841 } 1840 }
1842 #endif // !defined(TOOLKIT_GTK) 1841 #endif // !defined(TOOLKIT_GTK)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698