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

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

Issue 6271016: Revert 72381 - Fix size_t in printf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | chrome/browser/extensions/extension_omnibox_apitest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/string_util.h" 5 #include "base/string_util.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/autocomplete/autocomplete.h" 7 #include "chrome/browser/autocomplete/autocomplete.h"
8 #include "chrome/browser/autocomplete/autocomplete_edit.h" 8 #include "chrome/browser/autocomplete/autocomplete_edit.h"
9 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 9 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
10 #include "chrome/browser/autocomplete/autocomplete_match.h" 10 #include "chrome/browser/autocomplete/autocomplete_match.h"
(...skipping 15 matching lines...) Expand all
26 #if defined(OS_CHROMEOS) 26 #if defined(OS_CHROMEOS)
27 #define MAYBE_Autocomplete FLAKY_Autocomplete 27 #define MAYBE_Autocomplete FLAKY_Autocomplete
28 #else 28 #else
29 #define MAYBE_Autocomplete Autocomplete 29 #define MAYBE_Autocomplete Autocomplete
30 #endif 30 #endif
31 31
32 32
33 namespace { 33 namespace {
34 34
35 string16 AutocompleteResultAsString(const AutocompleteResult& result) { 35 string16 AutocompleteResultAsString(const AutocompleteResult& result) {
36 std::string output(base::StringPrintf("{%z} ", result.size())); 36 std::string output(base::StringPrintf("{%lu} ", result.size()));
37 for (size_t i = 0; i < result.size(); ++i) { 37 for (size_t i = 0; i < result.size(); ++i) {
38 AutocompleteMatch match = result.match_at(i); 38 AutocompleteMatch match = result.match_at(i);
39 std::string provider_name = match.provider->name(); 39 std::string provider_name = match.provider->name();
40 output.append(base::StringPrintf("[\"%s\" by \"%s\"] ", 40 output.append(base::StringPrintf("[\"%s\" by \"%s\"] ",
41 UTF16ToUTF8(match.contents).c_str(), 41 UTF16ToUTF8(match.contents).c_str(),
42 provider_name.c_str())); 42 provider_name.c_str()));
43 } 43 }
44 return UTF8ToUTF16(output); 44 return UTF8ToUTF16(output);
45 } 45 }
46 46
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 EXPECT_EQ(ASCIIToUTF16(" ?foo"), 236 EXPECT_EQ(ASCIIToUTF16(" ?foo"),
237 location_bar->location_entry()->GetText()); 237 location_bar->location_entry()->GetText());
238 238
239 size_t selection_start, selection_end; 239 size_t selection_start, selection_end;
240 location_bar->location_entry()->GetSelectionBounds(&selection_start, 240 location_bar->location_entry()->GetSelectionBounds(&selection_start,
241 &selection_end); 241 &selection_end);
242 EXPECT_EQ(4U, std::min(selection_start, selection_end)); 242 EXPECT_EQ(4U, std::min(selection_start, selection_end));
243 EXPECT_EQ(7U, std::max(selection_start, selection_end)); 243 EXPECT_EQ(7U, std::max(selection_start, selection_end));
244 } 244 }
245 } 245 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_omnibox_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698