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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/touch_operation_unittest.cc

Issue 343073003: Files.app: Provide detailed change information on onDirectoryChanged event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/file_system/touch_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/touch_operation.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "chrome/browser/chromeos/drive/drive.pb.h" 9 #include "chrome/browser/chromeos/drive/drive.pb.h"
10 #include "chrome/browser/chromeos/drive/file_errors.h" 10 #include "chrome/browser/chromeos/drive/file_errors.h"
(...skipping 30 matching lines...) Expand all
41 EXPECT_EQ(FILE_ERROR_OK, error); 41 EXPECT_EQ(FILE_ERROR_OK, error);
42 42
43 ResourceEntry entry; 43 ResourceEntry entry;
44 EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(kTestPath, &entry)); 44 EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(kTestPath, &entry));
45 EXPECT_EQ(base::Time::FromUTCExploded(kLastAccessTime), 45 EXPECT_EQ(base::Time::FromUTCExploded(kLastAccessTime),
46 base::Time::FromInternalValue(entry.file_info().last_accessed())); 46 base::Time::FromInternalValue(entry.file_info().last_accessed()));
47 EXPECT_EQ(base::Time::FromUTCExploded(kLastModifiedTime), 47 EXPECT_EQ(base::Time::FromUTCExploded(kLastModifiedTime),
48 base::Time::FromInternalValue(entry.file_info().last_modified())); 48 base::Time::FromInternalValue(entry.file_info().last_modified()));
49 EXPECT_EQ(ResourceEntry::DIRTY, entry.metadata_edit_state()); 49 EXPECT_EQ(ResourceEntry::DIRTY, entry.metadata_edit_state());
50 50
51 EXPECT_EQ(1U, observer()->get_changed_paths().size()); 51 EXPECT_EQ(1U, observer()->get_changed_files().size());
52 EXPECT_TRUE(observer()->get_changed_paths().count(kTestPath.DirName())); 52 EXPECT_TRUE(observer()->get_changed_files().count(kTestPath));
53 53
54 EXPECT_EQ(1U, observer()->updated_local_ids().size()); 54 EXPECT_EQ(1U, observer()->updated_local_ids().size());
55 EXPECT_TRUE(observer()->updated_local_ids().count(entry.local_id())); 55 EXPECT_TRUE(observer()->updated_local_ids().count(entry.local_id()));
56 } 56 }
57 57
58 } // namespace file_system 58 } // namespace file_system
59 } // namespace drive 59 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/touch_operation.cc ('k') | chrome/browser/chromeos/drive/file_system_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698