| OLD | NEW |
| 1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009-2010 The Chromium OS 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 // Unit tests for MountTask. | 5 // Unit tests for MountTask. |
| 6 | 6 |
| 7 #include "mount_task.h" | 7 #include "mount_task.h" |
| 8 | 8 |
| 9 #include <base/at_exit.h> | 9 #include <base/at_exit.h> |
| 10 #include <base/logging.h> | 10 #include <base/logging.h> |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 ASSERT_FALSE(event_.IsSignaled()); | 229 ASSERT_FALSE(event_.IsSignaled()); |
| 230 MountTask* mount_task = new MountTaskRemoveTrackedSubdirectories(NULL, | 230 MountTask* mount_task = new MountTaskRemoveTrackedSubdirectories(NULL, |
| 231 &mount_); | 231 &mount_); |
| 232 mount_task->set_complete_event(&event_); | 232 mount_task->set_complete_event(&event_); |
| 233 mount_task->set_result(&result_); | 233 mount_task->set_result(&result_); |
| 234 runner_.message_loop()->PostTask(FROM_HERE, mount_task); | 234 runner_.message_loop()->PostTask(FROM_HERE, mount_task); |
| 235 event_.TimedWait(wait_time_); | 235 event_.TimedWait(wait_time_); |
| 236 ASSERT_TRUE(event_.IsSignaled()); | 236 ASSERT_TRUE(event_.IsSignaled()); |
| 237 } | 237 } |
| 238 | 238 |
| 239 TEST_F(MountTaskTest, AutomaticFreeDiskSpace) { |
| 240 ASSERT_FALSE(event_.IsSignaled()); |
| 241 MountTask* mount_task = new MountTaskAutomaticFreeDiskSpace(NULL, &mount_); |
| 242 mount_task->set_complete_event(&event_); |
| 243 mount_task->set_result(&result_); |
| 244 runner_.message_loop()->PostTask(FROM_HERE, mount_task); |
| 245 event_.TimedWait(wait_time_); |
| 246 ASSERT_TRUE(event_.IsSignaled()); |
| 247 } |
| 248 |
| 239 } // namespace cryptohome | 249 } // namespace cryptohome |
| OLD | NEW |