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

Side by Side Diff: chrome/browser/chromeos/drive/sync_client_unittest.cc

Issue 18355004: google_apis: Move data files out of chrome/test/data/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix extension tests Created 7 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 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 "chrome/browser/chromeos/drive/sync_client.h" 5 #include "chrome/browser/chromeos/drive/sync_client.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } // namespace 74 } // namespace
75 75
76 class SyncClientTest : public testing::Test { 76 class SyncClientTest : public testing::Test {
77 public: 77 public:
78 virtual void SetUp() OVERRIDE { 78 virtual void SetUp() OVERRIDE {
79 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 79 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
80 80
81 profile_.reset(new TestingProfile); 81 profile_.reset(new TestingProfile);
82 82
83 drive_service_.reset(new SyncClientTestDriveService); 83 drive_service_.reset(new SyncClientTestDriveService);
84 drive_service_->LoadResourceListForWapi("chromeos/gdata/empty_feed.json"); 84 drive_service_->LoadResourceListForWapi("gdata/empty_feed.json");
85 drive_service_->LoadAccountMetadataForWapi( 85 drive_service_->LoadAccountMetadataForWapi(
86 "chromeos/gdata/account_metadata.json"); 86 "gdata/account_metadata.json");
87 87
88 scheduler_.reset(new JobScheduler(profile_.get(), drive_service_.get(), 88 scheduler_.reset(new JobScheduler(profile_.get(), drive_service_.get(),
89 base::MessageLoopProxy::current())); 89 base::MessageLoopProxy::current()));
90 90
91 metadata_storage_.reset(new ResourceMetadataStorage( 91 metadata_storage_.reset(new ResourceMetadataStorage(
92 temp_dir_.path(), base::MessageLoopProxy::current())); 92 temp_dir_.path(), base::MessageLoopProxy::current()));
93 ASSERT_TRUE(metadata_storage_->Initialize()); 93 ASSERT_TRUE(metadata_storage_->Initialize());
94 94
95 metadata_.reset(new internal::ResourceMetadata( 95 metadata_.reset(new internal::ResourceMetadata(
96 metadata_storage_.get(), base::MessageLoopProxy::current())); 96 metadata_storage_.get(), base::MessageLoopProxy::current()));
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 content.clear(); 284 content.clear();
285 285
286 EXPECT_EQ(FILE_ERROR_OK, cache_->GetFile(resource_ids_["dirty"], 286 EXPECT_EQ(FILE_ERROR_OK, cache_->GetFile(resource_ids_["dirty"],
287 std::string(), &cache_file)); 287 std::string(), &cache_file));
288 EXPECT_TRUE(file_util::ReadFileToString(cache_file, &content)); 288 EXPECT_TRUE(file_util::ReadFileToString(cache_file, &content));
289 EXPECT_EQ(kLocalContent, content); 289 EXPECT_EQ(kLocalContent, content);
290 } 290 }
291 291
292 } // namespace internal 292 } // namespace internal
293 } // namespace drive 293 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698