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

Side by Side Diff: chrome/browser/extensions/api/omnibox/omnibox_api_interactive_test.cc

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Remove debugging info. Created 3 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chrome_autocomplete_scheme_classifier.h" 5 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
6 #include "chrome/browser/extensions/api/omnibox/omnibox_api_testbase.h" 6 #include "chrome/browser/extensions/api/omnibox/omnibox_api_testbase.h"
7 #include "chrome/browser/search_engines/template_url_service_factory.h" 7 #include "chrome/browser/search_engines/template_url_service_factory.h"
8 #include "chrome/test/base/search_test_utils.h" 8 #include "chrome/test/base/search_test_utils.h"
9 #include "components/metrics/proto/omnibox_event.pb.h" 9 #include "components/metrics/proto/omnibox_event.pb.h"
10 #include "extensions/test/result_catcher.h" 10 #include "extensions/test/result_catcher.h"
(...skipping 27 matching lines...) Expand all
38 // Quickly type another query and accept it before getting suggestions back 38 // Quickly type another query and accept it before getting suggestions back
39 // for the query. The popup will close after accepting input - ensure that it 39 // for the query. The popup will close after accepting input - ensure that it
40 // does not reopen when the extension returns its suggestions. 40 // does not reopen when the extension returns its suggestions.
41 extensions::ResultCatcher catcher; 41 extensions::ResultCatcher catcher;
42 42
43 // TODO: Rather than send this second request by talking to the controller 43 // TODO: Rather than send this second request by talking to the controller
44 // directly, figure out how to send it via the proper calls to 44 // directly, figure out how to send it via the proper calls to
45 // location_bar or location_bar->(). 45 // location_bar or location_bar->().
46 autocomplete_controller->Start(AutocompleteInput( 46 autocomplete_controller->Start(AutocompleteInput(
47 base::ASCIIToUTF16("keyword command"), base::string16::npos, 47 base::ASCIIToUTF16("keyword command"), base::string16::npos,
48 std::string(), GURL(), metrics::OmniboxEventProto::NTP, true, false, true, 48 std::string(), GURL(), base::string16(), metrics::OmniboxEventProto::NTP,
49 true, false, ChromeAutocompleteSchemeClassifier(profile))); 49 true, false, true, true, false,
50 ChromeAutocompleteSchemeClassifier(profile)));
50 location_bar->AcceptInput(); 51 location_bar->AcceptInput();
51 WaitForAutocompleteDone(autocomplete_controller); 52 WaitForAutocompleteDone(autocomplete_controller);
52 EXPECT_TRUE(autocomplete_controller->done()); 53 EXPECT_TRUE(autocomplete_controller->done());
53 // This checks that the keyword provider (via javascript) 54 // This checks that the keyword provider (via javascript)
54 // gets told to navigate to the string "command". 55 // gets told to navigate to the string "command".
55 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 56 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
56 EXPECT_FALSE(popup_model->IsOpen()); 57 EXPECT_FALSE(popup_model->IsOpen());
57 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_api_browsertest.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698