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

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

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 years, 1 month 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) 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 <algorithm> 5 #include <algorithm>
6 #include <fstream> 6 #include <fstream>
7 7
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 { "tftp://example.com/mystartupfile", false }, 976 { "tftp://example.com/mystartupfile", false },
977 { "tip://123.123.123.123/?urn:xopen:xid", false }, 977 { "tip://123.123.123.123/?urn:xopen:xid", false },
978 { "tv:nbc.com", false }, 978 { "tv:nbc.com", false },
979 { "urn:foo:A123,456", false }, 979 { "urn:foo:A123,456", false },
980 { "vemmi://zeus.mctel.fr/demo", false }, 980 { "vemmi://zeus.mctel.fr/demo", false },
981 { "wais://www.mydomain.net:8765/mydatabase", false }, 981 { "wais://www.mydomain.net:8765/mydatabase", false },
982 { "xmpp:node@example.com", false }, 982 { "xmpp:node@example.com", false },
983 { "xmpp://guest@example.com", false }, 983 { "xmpp://guest@example.com", false },
984 }; 984 };
985 985
986 URLIndexPrivateData& private_data(*GetPrivateData());
987 const std::set<std::string>& whitelist(scheme_whitelist()); 986 const std::set<std::string>& whitelist(scheme_whitelist());
988 for (size_t i = 0; i < arraysize(data); ++i) { 987 for (size_t i = 0; i < arraysize(data); ++i) {
989 GURL url(data[i].url_spec); 988 GURL url(data[i].url_spec);
990 EXPECT_EQ(data[i].expected_is_whitelisted, 989 EXPECT_EQ(data[i].expected_is_whitelisted,
991 private_data.URLSchemeIsWhitelisted(url, whitelist)); 990 URLIndexPrivateData::URLSchemeIsWhitelisted(url, whitelist));
992 } 991 }
993 } 992 }
994 993
995 TEST_F(InMemoryURLIndexTest, ReadVisitsFromHistory) { 994 TEST_F(InMemoryURLIndexTest, ReadVisitsFromHistory) {
996 const HistoryInfoMap& history_info_map = GetPrivateData()->history_info_map_; 995 const HistoryInfoMap& history_info_map = GetPrivateData()->history_info_map_;
997 996
998 // Check (for URL with id 1) that the number of visits and their 997 // Check (for URL with id 1) that the number of visits and their
999 // transition types are what we expect. We don't bother checking 998 // transition types are what we expect. We don't bother checking
1000 // the timestamps because it's too much trouble. (The timestamps go 999 // the timestamps because it's too much trouble. (The timestamps go
1001 // through a transformation in InMemoryURLIndexTest::SetUp(). We 1000 // through a transformation in InMemoryURLIndexTest::SetUp(). We
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 full_file_path.GetComponents(&actual_parts); 1228 full_file_path.GetComponents(&actual_parts);
1230 ASSERT_EQ(expected_parts.size(), actual_parts.size()); 1229 ASSERT_EQ(expected_parts.size(), actual_parts.size());
1231 size_t count = expected_parts.size(); 1230 size_t count = expected_parts.size();
1232 for (size_t i = 0; i < count; ++i) 1231 for (size_t i = 0; i < count; ++i)
1233 EXPECT_EQ(expected_parts[i], actual_parts[i]); 1232 EXPECT_EQ(expected_parts[i], actual_parts[i]);
1234 // Must clear the history_dir_ to satisfy the dtor's DCHECK. 1233 // Must clear the history_dir_ to satisfy the dtor's DCHECK.
1235 set_history_dir(base::FilePath()); 1234 set_history_dir(base::FilePath());
1236 } 1235 }
1237 1236
1238 } // namespace history 1237 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/process_singleton_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698