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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/get_metadata_unittest.cc

Issue 1221093002: Add support for refreshing contents of providers which don't support watchers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/file_system_provider/operations/get_metadata.h " 5 #include "chrome/browser/chromeos/file_system_provider/operations/get_metadata.h "
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } // namespace 93 } // namespace
94 94
95 class FileSystemProviderOperationsGetMetadataTest : public testing::Test { 95 class FileSystemProviderOperationsGetMetadataTest : public testing::Test {
96 protected: 96 protected:
97 FileSystemProviderOperationsGetMetadataTest() {} 97 FileSystemProviderOperationsGetMetadataTest() {}
98 ~FileSystemProviderOperationsGetMetadataTest() override {} 98 ~FileSystemProviderOperationsGetMetadataTest() override {}
99 99
100 void SetUp() override { 100 void SetUp() override {
101 file_system_info_ = ProvidedFileSystemInfo( 101 file_system_info_ = ProvidedFileSystemInfo(
102 kExtensionId, MountOptions(kFileSystemId, "" /* display_name */), 102 kExtensionId, MountOptions(kFileSystemId, "" /* display_name */),
103 base::FilePath(), false /* configurable */, extensions::SOURCE_FILE); 103 base::FilePath(), false /* configurable */, true /* watchable */,
104 extensions::SOURCE_FILE);
104 } 105 }
105 106
106 ProvidedFileSystemInfo file_system_info_; 107 ProvidedFileSystemInfo file_system_info_;
107 }; 108 };
108 109
109 TEST_F(FileSystemProviderOperationsGetMetadataTest, ValidateName) { 110 TEST_F(FileSystemProviderOperationsGetMetadataTest, ValidateName) {
110 EXPECT_TRUE(ValidateName("hello-world!@#$%^&*()-_=+\"':,.<>?[]{}|\\", 111 EXPECT_TRUE(ValidateName("hello-world!@#$%^&*()-_=+\"':,.<>?[]{}|\\",
111 false /* root_entry */)); 112 false /* root_entry */));
112 EXPECT_FALSE(ValidateName("hello-world!@#$%^&*()-_=+\"':,.<>?[]{}|\\", 113 EXPECT_FALSE(ValidateName("hello-world!@#$%^&*()-_=+\"':,.<>?[]{}|\\",
113 true /* root_entry */)); 114 true /* root_entry */));
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 base::File::FILE_ERROR_TOO_MANY_OPENED); 367 base::File::FILE_ERROR_TOO_MANY_OPENED);
367 368
368 ASSERT_EQ(1u, callback_logger.events().size()); 369 ASSERT_EQ(1u, callback_logger.events().size());
369 CallbackLogger::Event* event = callback_logger.events()[0]; 370 CallbackLogger::Event* event = callback_logger.events()[0];
370 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); 371 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result());
371 } 372 }
372 373
373 } // namespace operations 374 } // namespace operations
374 } // namespace file_system_provider 375 } // namespace file_system_provider
375 } // namespace chromeos 376 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698