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

Side by Side Diff: chrome/browser/chromeos/drive/write_on_cache_file_unittest.cc

Issue 623293003: replace OVERRIDE and FINAL with override and final in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: run git cl format on echo_dialog_view.h Created 6 years, 2 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 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/write_on_cache_file.h" 5 #include "chrome/browser/chromeos/drive/write_on_cache_file.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/chromeos/drive/dummy_file_system.h" 8 #include "chrome/browser/chromeos/drive/dummy_file_system.h"
9 #include "content/public/test/test_browser_thread_bundle.h" 9 #include "content/public/test/test_browser_thread_bundle.h"
10 #include "content/public/test/test_utils.h" 10 #include "content/public/test/test_utils.h"
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 TestFileSystem() : num_closed_(0) { 27 TestFileSystem() : num_closed_(0) {
28 } 28 }
29 29
30 int num_closed() const { return num_closed_; } 30 int num_closed() const { return num_closed_; }
31 31
32 // Mimics OpenFile. It fails if the |file_path| points to a hosted document. 32 // Mimics OpenFile. It fails if the |file_path| points to a hosted document.
33 virtual void OpenFile(const base::FilePath& file_path, 33 virtual void OpenFile(const base::FilePath& file_path,
34 OpenMode open_mode, 34 OpenMode open_mode,
35 const std::string& mime_type, 35 const std::string& mime_type,
36 const OpenFileCallback& callback) OVERRIDE { 36 const OpenFileCallback& callback) override {
37 EXPECT_EQ(OPEN_OR_CREATE_FILE, open_mode); 37 EXPECT_EQ(OPEN_OR_CREATE_FILE, open_mode);
38 38
39 // Emulate a case of opening a hosted document. 39 // Emulate a case of opening a hosted document.
40 if (file_path == base::FilePath(kInvalidPath)) { 40 if (file_path == base::FilePath(kInvalidPath)) {
41 callback.Run(FILE_ERROR_INVALID_OPERATION, base::FilePath(), 41 callback.Run(FILE_ERROR_INVALID_OPERATION, base::FilePath(),
42 base::Closure()); 42 base::Closure());
43 return; 43 return;
44 } 44 }
45 45
46 callback.Run(FILE_ERROR_OK, base::FilePath(kLocalPath), 46 callback.Run(FILE_ERROR_OK, base::FilePath(kLocalPath),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 base::FilePath(kInvalidPath), 93 base::FilePath(kInvalidPath),
94 std::string(), // mime_type 94 std::string(), // mime_type
95 google_apis::test_util::CreateCopyResultCallback(&error, &path)); 95 google_apis::test_util::CreateCopyResultCallback(&error, &path));
96 content::RunAllBlockingPoolTasksUntilIdle(); 96 content::RunAllBlockingPoolTasksUntilIdle();
97 97
98 EXPECT_EQ(FILE_ERROR_INVALID_OPERATION, error); 98 EXPECT_EQ(FILE_ERROR_INVALID_OPERATION, error);
99 EXPECT_TRUE(path.empty()); 99 EXPECT_TRUE(path.empty());
100 } 100 }
101 101
102 } // namespace drive 102 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/test_util.h ('k') | chrome/browser/chromeos/enrollment_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698