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

Side by Side Diff: webkit/fileapi/file_system_origin_database_unittest.cc

Issue 7057032: Integrated obfuscation with quota; all unit tests now pass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminated a vector copy Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 std::string origin1("origin1"); 138 std::string origin1("origin1");
139 139
140 EXPECT_FALSE(database.HasOriginPath(origin0)); 140 EXPECT_FALSE(database.HasOriginPath(origin0));
141 EXPECT_FALSE(database.HasOriginPath(origin1)); 141 EXPECT_FALSE(database.HasOriginPath(origin1));
142 142
143 FilePath path0; 143 FilePath path0;
144 FilePath path1; 144 FilePath path1;
145 EXPECT_TRUE(database.GetPathForOrigin(origin0, &path0)); 145 EXPECT_TRUE(database.GetPathForOrigin(origin0, &path0));
146 EXPECT_TRUE(database.ListAllOrigins(&origins)); 146 EXPECT_TRUE(database.ListAllOrigins(&origins));
147 EXPECT_EQ(origins.size(), 1UL); 147 EXPECT_EQ(origins.size(), 1UL);
148 EXPECT_EQ(origins[0].first, origin0); 148 EXPECT_EQ(origins[0].origin, origin0);
149 EXPECT_EQ(origins[0].second, path0); 149 EXPECT_EQ(origins[0].path, path0);
150 origins.clear(); 150 origins.clear();
151 EXPECT_TRUE(database.GetPathForOrigin(origin1, &path1)); 151 EXPECT_TRUE(database.GetPathForOrigin(origin1, &path1));
152 EXPECT_TRUE(database.ListAllOrigins(&origins)); 152 EXPECT_TRUE(database.ListAllOrigins(&origins));
153 EXPECT_EQ(origins.size(), 2UL); 153 EXPECT_EQ(origins.size(), 2UL);
154 if (origins[0].first == origin0) { 154 if (origins[0].origin == origin0) {
155 EXPECT_EQ(origins[0].second, path0); 155 EXPECT_EQ(origins[0].path, path0);
156 EXPECT_EQ(origins[1].first, origin1); 156 EXPECT_EQ(origins[1].origin, origin1);
157 EXPECT_EQ(origins[1].second, path1); 157 EXPECT_EQ(origins[1].path, path1);
158 } else { 158 } else {
159 EXPECT_EQ(origins[0].first, origin1); 159 EXPECT_EQ(origins[0].origin, origin1);
160 EXPECT_EQ(origins[0].second, path1); 160 EXPECT_EQ(origins[0].path, path1);
161 EXPECT_EQ(origins[1].first, origin0); 161 EXPECT_EQ(origins[1].origin, origin0);
162 EXPECT_EQ(origins[1].second, path0); 162 EXPECT_EQ(origins[1].path, path0);
163 } 163 }
164 } 164 }
165 165
166 } // namespace fileapi 166 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_origin_database.cc ('k') | webkit/fileapi/file_system_path_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698