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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/task_dependency_manager_unittest.cc

Issue 610223002: [SyncFS] Use nullptr instead of NULL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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/sync_file_system/drive_backend/task_dependency_manager. h" 5 #include "chrome/browser/sync_file_system/drive_backend/task_dependency_manager. h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 #define FPL(path) FILE_PATH_LITERAL(path) 10 #define FPL(path) FILE_PATH_LITERAL(path)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_FALSE(InsertPath(&manager, "app_id", FPL("/foo/bar"))); 102 EXPECT_FALSE(InsertPath(&manager, "app_id", FPL("/foo/bar")));
103 EraseExclusiveTask(&manager); 103 EraseExclusiveTask(&manager);
104 104
105 EXPECT_TRUE(InsertPath(&manager, "app_id", FPL("/foo/bar"))); 105 EXPECT_TRUE(InsertPath(&manager, "app_id", FPL("/foo/bar")));
106 ErasePath(&manager, "app_id", FPL("/foo/bar")); 106 ErasePath(&manager, "app_id", FPL("/foo/bar"));
107 } 107 }
108 108
109 TEST(TaskDependencyManagerTest, PermissiveTask) { 109 TEST(TaskDependencyManagerTest, PermissiveTask) {
110 TaskDependencyManager manager; 110 TaskDependencyManager manager;
111 111
112 EXPECT_TRUE(manager.Insert(NULL)); 112 EXPECT_TRUE(manager.Insert(nullptr));
113 EXPECT_TRUE(InsertPath(&manager, "app_id", FPL("/foo/bar"))); 113 EXPECT_TRUE(InsertPath(&manager, "app_id", FPL("/foo/bar")));
114 EXPECT_FALSE(InsertExclusiveTask(&manager)); 114 EXPECT_FALSE(InsertExclusiveTask(&manager));
115 ErasePath(&manager, "app_id", FPL("/foo/bar")); 115 ErasePath(&manager, "app_id", FPL("/foo/bar"));
116 116
117 EXPECT_FALSE(InsertExclusiveTask(&manager)); 117 EXPECT_FALSE(InsertExclusiveTask(&manager));
118 manager.Erase(NULL); 118 manager.Erase(nullptr);
119 EXPECT_TRUE(InsertExclusiveTask(&manager)); 119 EXPECT_TRUE(InsertExclusiveTask(&manager));
120 120
121 EXPECT_FALSE(manager.Insert(NULL)); 121 EXPECT_FALSE(manager.Insert(nullptr));
122 122
123 EraseExclusiveTask(&manager); 123 EraseExclusiveTask(&manager);
124 } 124 }
125 125
126 } // namespace drive_backend 126 } // namespace drive_backend
127 } // namespace sync_file_system 127 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc ('k') | chrome/browser/sync_file_system/file_change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698