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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_provider_unittest.cc

Issue 399063002: Remove BaseSearchProvider::set_in_app_list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 6 years, 4 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
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 "chrome/browser/autocomplete/autocomplete_provider.h" 5 #include "chrome/browser/autocomplete/autocomplete_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 controller_->result().default_match()->type); 445 controller_->result().default_match()->type);
446 } 446 }
447 447
448 void AutocompleteProviderTest::CopyResults() { 448 void AutocompleteProviderTest::CopyResults() {
449 result_.CopyFrom(controller_->result()); 449 result_.CopyFrom(controller_->result());
450 } 450 }
451 451
452 GURL AutocompleteProviderTest::GetDestinationURL( 452 GURL AutocompleteProviderTest::GetDestinationURL(
453 AutocompleteMatch match, 453 AutocompleteMatch match,
454 base::TimeDelta query_formulation_time) const { 454 base::TimeDelta query_formulation_time) const {
455 controller_->UpdateMatchDestinationURL(query_formulation_time, &match); 455 controller_->UpdateMatchDestinationURLWithQueryFormulationTime(
456 query_formulation_time, &match);
456 return match.destination_url; 457 return match.destination_url;
457 } 458 }
458 459
459 void AutocompleteProviderTest::Observe( 460 void AutocompleteProviderTest::Observe(
460 int type, 461 int type,
461 const content::NotificationSource& source, 462 const content::NotificationSource& source,
462 const content::NotificationDetails& details) { 463 const content::NotificationDetails& details) {
463 if (controller_->done()) { 464 if (controller_->done()) {
464 CopyResults(); 465 CopyResults();
465 base::MessageLoop::current()->Quit(); 466 base::MessageLoop::current()->Quit();
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); 669 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456));
669 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j0j4&", url.path()); 670 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j0j4&", url.path());
670 671
671 // Test page classification and field trial triggered set. 672 // Test page classification and field trial triggered set.
672 controller_->search_provider_->field_trial_triggered_in_session_ = true; 673 controller_->search_provider_->field_trial_triggered_in_session_ = true;
673 EXPECT_TRUE( 674 EXPECT_TRUE(
674 controller_->search_provider_->field_trial_triggered_in_session()); 675 controller_->search_provider_->field_trial_triggered_in_session());
675 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); 676 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456));
676 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j1j4&", url.path()); 677 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j1j4&", url.path());
677 } 678 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_controller.cc ('k') | chrome/browser/autocomplete/base_search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698