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

Unified Diff: chrome/common/extensions/url_pattern_set_unittest.cc

Issue 7347011: Update URLPatternSet to contain a std::set instead of std::vector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile errors. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/url_pattern_set.cc ('k') | chrome/common/extensions/url_pattern_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/url_pattern_set_unittest.cc
diff --git a/chrome/common/extensions/url_pattern_set_unittest.cc b/chrome/common/extensions/url_pattern_set_unittest.cc
index 8c05f2c705353da53725f8526a719cf163002e20..f9717ef36d572e85e9e9d53d7aeb41b313e57181 100644
--- a/chrome/common/extensions/url_pattern_set_unittest.cc
+++ b/chrome/common/extensions/url_pattern_set_unittest.cc
@@ -7,27 +7,6 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace {
-
-static void AssertEqualExtents(const URLPatternSet& extent1,
- const URLPatternSet& extent2) {
- URLPatternList patterns1 = extent1.patterns();
- URLPatternList patterns2 = extent2.patterns();
- std::set<std::string> strings1;
- EXPECT_EQ(patterns1.size(), patterns2.size());
-
- for (size_t i = 0; i < patterns1.size(); ++i)
- strings1.insert(patterns1.at(i).GetAsString());
-
- std::set<std::string> strings2;
- for (size_t i = 0; i < patterns2.size(); ++i)
- strings2.insert(patterns2.at(i).GetAsString());
-
- EXPECT_EQ(strings1, strings2);
-}
-
-} // namespace
-
static const int kAllSchemes =
URLPattern::SCHEME_HTTP |
URLPattern::SCHEME_HTTPS |
@@ -96,7 +75,7 @@ TEST(URLPatternSetTest, CreateUnion) {
// Union with an empty set.
URLPatternSet result;
URLPatternSet::CreateUnion(extent1, empty_extent, &result);
- AssertEqualExtents(expected, result);
+ EXPECT_EQ(expected, result);
// Union with a real set (including a duplicate).
URLPatternSet extent2;
@@ -111,5 +90,5 @@ TEST(URLPatternSetTest, CreateUnion) {
result.ClearPatterns();
URLPatternSet::CreateUnion(extent1, extent2, &result);
- AssertEqualExtents(expected, result);
+ EXPECT_EQ(expected, result);
}
« no previous file with comments | « chrome/common/extensions/url_pattern_set.cc ('k') | chrome/common/extensions/url_pattern_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698