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

Side by Side Diff: chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc

Issue 107001: Move scoped_vector.h and stl_util-inl.h to base/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/scoped_vector.h"
5 #include "chrome/browser/search_engines/template_url.h" 6 #include "chrome/browser/search_engines/template_url.h"
6 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 7 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
7 #include "chrome/common/pref_names.h" 8 #include "chrome/common/pref_names.h"
8 #include "chrome/common/scoped_vector.h"
9 #include "chrome/test/testing_profile.h" 9 #include "chrome/test/testing_profile.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 typedef testing::Test TemplateURLPrepopulateDataTest; 12 typedef testing::Test TemplateURLPrepopulateDataTest;
13 13
14 // Verifies the set of prepopulate data doesn't contain entries with duplicate 14 // Verifies the set of prepopulate data doesn't contain entries with duplicate
15 // ids. 15 // ids.
16 TEST_F(TemplateURLPrepopulateDataTest, UniqueIDs) { 16 TEST_F(TemplateURLPrepopulateDataTest, UniqueIDs) {
17 int ids[] = { 'A'<<8|'D', 'A'<<8|'E', 'A'<<8|'F', 'A'<<8|'G', 'A'<<8|'I', 17 int ids[] = { 'A'<<8|'D', 'A'<<8|'E', 'A'<<8|'F', 'A'<<8|'G', 'A'<<8|'I',
18 'A'<<8|'L', 'A'<<8|'M', 'A'<<8|'N', 'A'<<8|'O', 'A'<<8|'Q', 18 'A'<<8|'L', 'A'<<8|'M', 'A'<<8|'N', 'A'<<8|'O', 'A'<<8|'Q',
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 TemplateURLPrepopulateData::GetPrepopulatedEngines( 71 TemplateURLPrepopulateData::GetPrepopulatedEngines(
72 profile.GetPrefs(), &(urls.get()), &url_count); 72 profile.GetPrefs(), &(urls.get()), &url_count);
73 std::set<int> unique_ids; 73 std::set<int> unique_ids;
74 for (size_t turl_i = 0; turl_i < urls.size(); ++turl_i) { 74 for (size_t turl_i = 0; turl_i < urls.size(); ++turl_i) {
75 ASSERT_TRUE(unique_ids.find(urls[turl_i]->prepopulate_id()) == 75 ASSERT_TRUE(unique_ids.find(urls[turl_i]->prepopulate_id()) ==
76 unique_ids.end()); 76 unique_ids.end());
77 unique_ids.insert(urls[turl_i]->prepopulate_id()); 77 unique_ids.insert(urls[turl_i]->prepopulate_id());
78 } 78 }
79 } 79 }
80 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_model.cc ('k') | chrome/browser/sessions/base_session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698