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

Side by Side Diff: trunk/src/chrome/browser/autocomplete/extension_app_provider_unittest.cc

Issue 19714004: Revert 213148 "Add asserts to TestingProfile::CreateHistoryServi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | trunk/src/chrome/browser/autocomplete/history_quick_provider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/autocomplete/autocomplete_match.h" 8 #include "chrome/browser/autocomplete/autocomplete_match.h"
9 #include "chrome/browser/autocomplete/extension_app_provider.h" 9 #include "chrome/browser/autocomplete/extension_app_provider.h"
10 #include "chrome/browser/history/history_service.h" 10 #include "chrome/browser/history/history_service.h"
(...skipping 24 matching lines...) Expand all
35 protected: 35 protected:
36 base::MessageLoopForUI message_loop_; 36 base::MessageLoopForUI message_loop_;
37 content::TestBrowserThread ui_thread_; 37 content::TestBrowserThread ui_thread_;
38 scoped_refptr<ExtensionAppProvider> app_provider_; 38 scoped_refptr<ExtensionAppProvider> app_provider_;
39 scoped_ptr<TestingProfile> profile_; 39 scoped_ptr<TestingProfile> profile_;
40 HistoryService* history_service_; 40 HistoryService* history_service_;
41 }; 41 };
42 42
43 void ExtensionAppProviderTest::SetUp() { 43 void ExtensionAppProviderTest::SetUp() {
44 profile_.reset(new TestingProfile()); 44 profile_.reset(new TestingProfile());
45 ASSERT_TRUE(profile_->CreateHistoryService(true, false)); 45 profile_->CreateHistoryService(true, false);
46 profile_->BlockUntilHistoryProcessesPendingRequests(); 46 profile_->BlockUntilHistoryProcessesPendingRequests();
47 history_service_ = 47 history_service_ =
48 HistoryServiceFactory::GetForProfile(profile_.get(), 48 HistoryServiceFactory::GetForProfile(profile_.get(),
49 Profile::EXPLICIT_ACCESS); 49 Profile::EXPLICIT_ACCESS);
50 50
51 app_provider_ = new ExtensionAppProvider(NULL, profile_.get()); 51 app_provider_ = new ExtensionAppProvider(NULL, profile_.get());
52 52
53 struct TestExtensionApp { 53 struct TestExtensionApp {
54 const char* app_name; 54 const char* app_name;
55 const char* launch_url; 55 const char* launch_url;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 ExtensionAppProvider::ExtensionApp extension_app = 144 ExtensionAppProvider::ExtensionApp extension_app =
145 {ASCIIToUTF16(cases[i].name), url, true}; 145 {ASCIIToUTF16(cases[i].name), url, true};
146 AutocompleteMatch match = 146 AutocompleteMatch match =
147 app_provider_->CreateAutocompleteMatch(input, 147 app_provider_->CreateAutocompleteMatch(input,
148 extension_app, 148 extension_app,
149 0, 149 0,
150 string16::npos); 150 string16::npos);
151 EXPECT_EQ(ASCIIToUTF16(cases[i].match_contents), match.contents); 151 EXPECT_EQ(ASCIIToUTF16(cases[i].match_contents), match.contents);
152 } 152 }
153 } 153 }
OLDNEW
« no previous file with comments | « no previous file | trunk/src/chrome/browser/autocomplete/history_quick_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698