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

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

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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_sync_context.h" 5 #include "webkit/fileapi/syncable/local_file_sync_context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 EXPECT_EQ(quota::kQuotaStatusOk, 460 EXPECT_EQ(quota::kQuotaStatusOk,
461 file_system.GetUsageAndQuota(&new_usage, &quota)); 461 file_system.GetUsageAndQuota(&new_usage, &quota));
462 EXPECT_EQ(new_usage, initial_usage); 462 EXPECT_EQ(new_usage, initial_usage);
463 463
464 sync_context_->ShutdownOnUIThread(); 464 sync_context_->ShutdownOnUIThread();
465 sync_context_ = NULL; 465 sync_context_ = NULL;
466 file_system.TearDown(); 466 file_system.TearDown();
467 } 467 }
468 468
469 TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) { 469 TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) {
470 ScopedTempDir temp_dir; 470 base::ScopedTempDir temp_dir;
471 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 471 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
472 472
473 CannedSyncableFileSystem file_system(GURL(kOrigin1), kServiceName, 473 CannedSyncableFileSystem file_system(GURL(kOrigin1), kServiceName,
474 io_task_runner_, file_task_runner_); 474 io_task_runner_, file_task_runner_);
475 file_system.SetUp(); 475 file_system.SetUp();
476 476
477 sync_context_ = new LocalFileSyncContext(ui_task_runner_, io_task_runner_); 477 sync_context_ = new LocalFileSyncContext(ui_task_runner_, io_task_runner_);
478 ASSERT_EQ(SYNC_STATUS_OK, 478 ASSERT_EQ(SYNC_STATUS_OK,
479 file_system.MaybeInitializeFileSystemContext(sync_context_)); 479 file_system.MaybeInitializeFileSystemContext(sync_context_));
480 ASSERT_EQ(base::PLATFORM_FILE_OK, file_system.OpenFileSystem()); 480 ASSERT_EQ(base::PLATFORM_FILE_OK, file_system.OpenFileSystem());
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // Make sure all three files/directory exist. 594 // Make sure all three files/directory exist.
595 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.FileExists(kFile1)); 595 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.FileExists(kFile1));
596 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.FileExists(kFile2)); 596 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.FileExists(kFile2));
597 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.DirectoryExists(kDir)); 597 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.DirectoryExists(kDir));
598 598
599 sync_context_->ShutdownOnUIThread(); 599 sync_context_->ShutdownOnUIThread();
600 file_system.TearDown(); 600 file_system.TearDown();
601 } 601 }
602 602
603 } // namespace fileapi 603 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698