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

Unified Diff: chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
Index: chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
index 869675cd0b53c5388528ea67dd59b2438fd2e59e..28661219c4f899e821cc12d713da0bda6f2080b7 100644
--- a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
@@ -204,10 +204,9 @@ TEST_F(LocalFileChangeTrackerTest, RestoreCreateAndModifyChanges) {
file_system_.GetChangedURLsInTracker(&urls);
ASSERT_EQ(0U, urls.size());
- const GURL blob_url("blob:test");
const std::string kData("Lorem ipsum.");
MockBlobURLRequestContext url_request_context(file_system_context());
- ScopedTextBlob blob(url_request_context, blob_url, kData);
+ ScopedTextBlob blob(url_request_context, "blob_id:test", kData);
// Create files and nested directories.
EXPECT_EQ(base::PLATFORM_FILE_OK,
@@ -222,9 +221,9 @@ TEST_F(LocalFileChangeTrackerTest, RestoreCreateAndModifyChanges) {
file_system_.TruncateFile(URL(kPath3), 1)); // Modifies the file.
EXPECT_EQ(base::PLATFORM_FILE_OK,
file_system_.CreateFile(URL(kPath4))); // Creates another file.
- EXPECT_EQ(static_cast<int64>(kData.size()),
+ EXPECT_EQ(static_cast<int64>(kData.size()), // Modifies the file.
file_system_.Write(&url_request_context,
- URL(kPath4), blob_url)); // Modifies the file.
+ URL(kPath4), blob.GetBlobDataHandle()));
// Verify the changes.
file_system_.GetChangedURLsInTracker(&urls);
@@ -356,10 +355,9 @@ TEST_F(LocalFileChangeTrackerTest, RestoreCopyChanges) {
file_system_.GetChangedURLsInTracker(&urls);
ASSERT_EQ(0U, urls.size());
- const GURL blob_url("blob:test");
const std::string kData("Lorem ipsum.");
MockBlobURLRequestContext url_request_context(file_system_context());
- ScopedTextBlob blob(url_request_context, blob_url, kData);
+ ScopedTextBlob blob(url_request_context, "blob_id:test", kData);
// Create files and nested directories.
EXPECT_EQ(base::PLATFORM_FILE_OK,
@@ -375,8 +373,8 @@ TEST_F(LocalFileChangeTrackerTest, RestoreCopyChanges) {
EXPECT_EQ(base::PLATFORM_FILE_OK,
file_system_.CreateFile(URL(kPath4))); // Creates another file.
EXPECT_EQ(static_cast<int64>(kData.size()),
- file_system_.Write(&url_request_context,
- URL(kPath4), blob_url)); // Modifies the file.
+ file_system_.Write(&url_request_context, // Modifies the file.
+ URL(kPath4), blob.GetBlobDataHandle()));
// Verify we have 5 changes for preparation.
file_system_.GetChangedURLsInTracker(&urls);

Powered by Google App Engine
This is Rietveld 408576698