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

Unified Diff: chrome/browser/chromeos/drive/file_system/touch_operation_unittest.cc

Issue 1215503010: OBSOLETE: Move (most of) chrome/browser/chromeos/drive into components/drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@drive-componentize-service
Patch Set: Created 5 years, 6 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/chromeos/drive/file_system/touch_operation_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system/touch_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/touch_operation_unittest.cc
deleted file mode 100644
index 7c64bd82a6c62fad03e971f41cbbf50ecd75fade..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/drive/file_system/touch_operation_unittest.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/drive/file_system/touch_operation.h"
-
-#include "base/files/file_path.h"
-#include "base/time/time.h"
-#include "chrome/browser/chromeos/drive/drive.pb.h"
-#include "chrome/browser/chromeos/drive/file_errors.h"
-#include "chrome/browser/chromeos/drive/file_system/operation_test_base.h"
-#include "chrome/browser/chromeos/drive/resource_metadata.h"
-#include "google_apis/drive/test_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace drive {
-namespace file_system {
-
-typedef OperationTestBase TouchOperationTest;
-
-TEST_F(TouchOperationTest, TouchFile) {
- TouchOperation operation(blocking_task_runner(),
- delegate(),
- metadata());
-
- const base::FilePath kTestPath(FILE_PATH_LITERAL("drive/root/File 1.txt"));
- const base::Time::Exploded kLastAccessTime = {
- 2012, 7, 0, 19, 15, 59, 13, 123
- };
- const base::Time::Exploded kLastModifiedTime = {
- 2013, 7, 0, 19, 15, 59, 13, 123
- };
-
- FileError error = FILE_ERROR_FAILED;
- operation.TouchFile(
- kTestPath,
- base::Time::FromUTCExploded(kLastAccessTime),
- base::Time::FromUTCExploded(kLastModifiedTime),
- google_apis::test_util::CreateCopyResultCallback(&error));
- content::RunAllBlockingPoolTasksUntilIdle();
- EXPECT_EQ(FILE_ERROR_OK, error);
-
- ResourceEntry entry;
- EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(kTestPath, &entry));
- EXPECT_EQ(base::Time::FromUTCExploded(kLastAccessTime),
- base::Time::FromInternalValue(entry.file_info().last_accessed()));
- EXPECT_EQ(base::Time::FromUTCExploded(kLastModifiedTime),
- base::Time::FromInternalValue(entry.file_info().last_modified()));
- EXPECT_EQ(ResourceEntry::DIRTY, entry.metadata_edit_state());
-
- EXPECT_EQ(1U, delegate()->get_changed_files().size());
- EXPECT_TRUE(delegate()->get_changed_files().count(kTestPath));
-
- EXPECT_EQ(1U, delegate()->updated_local_ids().size());
- EXPECT_TRUE(delegate()->updated_local_ids().count(entry.local_id()));
-}
-
-} // namespace file_system
-} // namespace drive

Powered by Google App Engine
This is Rietveld 408576698