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

Side by Side Diff: chrome/browser/history/snippet_unittest.cc

Issue 42155: Remove logging.h from cc files that don't use it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/history/snippet.h" 5 #include "chrome/browser/history/snippet.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h"
10 #include "base/string_util.h" 9 #include "base/string_util.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 11
13 namespace { 12 namespace {
14 13
15 // A sample document to compute snippets of. 14 // A sample document to compute snippets of.
16 // The \x bits after the first "Google" are UTF-8 of U+2122 TRADE MARK SIGN, 15 // The \x bits after the first "Google" are UTF-8 of U+2122 TRADE MARK SIGN,
17 // and are useful for verifying we don't screw up in UTF-8/UTF-16 conversion. 16 // and are useful for verifying we don't screw up in UTF-8/UTF-16 conversion.
18 const char* kSampleDocument = "Google\xe2\x84\xa2 Terms of Service " 17 const char* kSampleDocument = "Google\xe2\x84\xa2 Terms of Service "
19 "Welcome to Google! " 18 "Welcome to Google! "
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) { 242 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
244 Snippet::MatchPositions matches; 243 Snippet::MatchPositions matches;
245 Snippet::ExtractMatchPositions(data[i].offsets_string, "0", &matches); 244 Snippet::ExtractMatchPositions(data[i].offsets_string, "0", &matches);
246 EXPECT_EQ(data[i].expected_match_count, matches.size()); 245 EXPECT_EQ(data[i].expected_match_count, matches.size());
247 for (size_t j = 0; j < data[i].expected_match_count; ++j) { 246 for (size_t j = 0; j < data[i].expected_match_count; ++j) {
248 EXPECT_EQ(data[i].expected_matches[2 * j], matches[j].first); 247 EXPECT_EQ(data[i].expected_matches[2 * j], matches[j].first);
249 EXPECT_EQ(data[i].expected_matches[2 * j + 1], matches[j].second); 248 EXPECT_EQ(data[i].expected_matches[2 * j + 1], matches[j].second);
250 } 249 }
251 } 250 }
252 } 251 }
OLDNEW
« no previous file with comments | « chrome/browser/history/query_parser_unittest.cc ('k') | chrome/browser/history/visit_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698