| OLD | NEW |
| 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/extensions/api/file_system/entry_watcher_service.h" | 5 #include "chrome/browser/extensions/api/file_system/entry_watcher_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
| 14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 15 #include "chrome/common/extensions/api/file_system.h" | 15 #include "chrome/common/extensions/api/file_system.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
| 17 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
| 18 #include "content/public/test/test_file_system_context.h" | 18 #include "content/public/test/test_file_system_context.h" |
| 19 #include "extensions/browser/event_router.h" | 19 #include "extensions/browser/event_router.h" |
| 20 #include "storage/browser/fileapi/file_system_url.h" |
| 20 #include "storage/common/fileapi/file_system_types.h" | 21 #include "storage/common/fileapi/file_system_types.h" |
| 21 #include "webkit/browser/fileapi/file_system_url.h" | |
| 22 | 22 |
| 23 namespace extensions { | 23 namespace extensions { |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj"; | 26 const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj"; |
| 27 | 27 |
| 28 void LogStatus(std::vector<base::File::Error>* log, base::File::Error status) { | 28 void LogStatus(std::vector<base::File::Error>* log, base::File::Error status) { |
| 29 log->push_back(status); | 29 log->push_back(status); |
| 30 } | 30 } |
| 31 | 31 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 std::vector<base::File::Error> log; | 245 std::vector<base::File::Error> log; |
| 246 service_->UnwatchEntry( | 246 service_->UnwatchEntry( |
| 247 kExtensionId, testing_url_, base::Bind(&LogStatus, &log)); | 247 kExtensionId, testing_url_, base::Bind(&LogStatus, &log)); |
| 248 base::RunLoop().RunUntilIdle(); | 248 base::RunLoop().RunUntilIdle(); |
| 249 | 249 |
| 250 ASSERT_EQ(1u, log.size()); | 250 ASSERT_EQ(1u, log.size()); |
| 251 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, log[0]); | 251 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, log[0]); |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace extensions | 254 } // namespace extensions |
| OLD | NEW |