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

Side by Side Diff: webkit/fileapi/syncable/local_file_change_tracker_unittest.cc

Issue 11103027: Support filesystem files from BlobURLRequestJob (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 2 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) 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 "webkit/fileapi/syncable/local_file_change_tracker.h" 5 #include "webkit/fileapi/syncable/local_file_change_tracker.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const char kPath2Copy[] = "dir b/dir"; // To be copied from kPath2 172 const char kPath2Copy[] = "dir b/dir"; // To be copied from kPath2
173 const char kPath3Copy[] = "dir b/file a"; // To be copied from kPath3 173 const char kPath3Copy[] = "dir b/file a"; // To be copied from kPath3
174 const char kPath4Copy[] = "dir b/file b"; // To be copied from kPath4 174 const char kPath4Copy[] = "dir b/file b"; // To be copied from kPath4
175 175
176 change_tracker()->GetChangedURLs(&urls); 176 change_tracker()->GetChangedURLs(&urls);
177 urlset.insert(urls.begin(), urls.end()); 177 urlset.insert(urls.begin(), urls.end());
178 ASSERT_EQ(0U, urlset.size()); 178 ASSERT_EQ(0U, urlset.size());
179 179
180 const GURL blob_url("blob:test"); 180 const GURL blob_url("blob:test");
181 const std::string kData("Lorem ipsum."); 181 const std::string kData("Lorem ipsum.");
182 MockBlobURLRequestContext url_request_context; 182 MockBlobURLRequestContext url_request_context(file_system_context());
183 ScopedTextBlob blob(url_request_context, blob_url, kData); 183 ScopedTextBlob blob(url_request_context, blob_url, kData);
184 184
185 // Creates files and nested directories. 185 // Creates files and nested directories.
186 EXPECT_EQ(base::PLATFORM_FILE_OK, 186 EXPECT_EQ(base::PLATFORM_FILE_OK,
187 file_system_.CreateFile(URL(kPath0))); // Creates a file. 187 file_system_.CreateFile(URL(kPath0))); // Creates a file.
188 EXPECT_EQ(base::PLATFORM_FILE_OK, 188 EXPECT_EQ(base::PLATFORM_FILE_OK,
189 file_system_.CreateDirectory(URL(kPath1))); // Creates a dir. 189 file_system_.CreateDirectory(URL(kPath1))); // Creates a dir.
190 EXPECT_EQ(base::PLATFORM_FILE_OK, 190 EXPECT_EQ(base::PLATFORM_FILE_OK,
191 file_system_.CreateDirectory(URL(kPath2))); // Creates another dir. 191 file_system_.CreateDirectory(URL(kPath2))); // Creates another dir.
192 EXPECT_EQ(base::PLATFORM_FILE_OK, 192 EXPECT_EQ(base::PLATFORM_FILE_OK,
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 FileChange::FILE_TYPE_FILE)); 442 FileChange::FILE_TYPE_FILE));
443 VerifyAndClearChange(URL(kPath8), 443 VerifyAndClearChange(URL(kPath8),
444 FileChange(FileChange::FILE_CHANGE_ADD_OR_UPDATE, 444 FileChange(FileChange::FILE_CHANGE_ADD_OR_UPDATE,
445 FileChange::FILE_TYPE_DIRECTORY)); 445 FileChange::FILE_TYPE_DIRECTORY));
446 VerifyAndClearChange(URL(kPath9), 446 VerifyAndClearChange(URL(kPath9),
447 FileChange(FileChange::FILE_CHANGE_ADD_OR_UPDATE, 447 FileChange(FileChange::FILE_CHANGE_ADD_OR_UPDATE,
448 FileChange::FILE_TYPE_FILE)); 448 FileChange::FILE_TYPE_FILE));
449 } 449 }
450 450
451 } // namespace fileapi 451 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698