| Index: chrome/browser/chromeos/file_system_provider/queue_unittest.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/queue_unittest.cc b/chrome/browser/chromeos/file_system_provider/queue_unittest.cc
|
| index 5b2fbe1c68606f760f964dcd3e82f6f685aac2e1..62edba9fccb81fea5779e2a93161fa10cca3a06f 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/queue_unittest.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/queue_unittest.cc
|
| @@ -113,6 +113,30 @@ TEST_F(FileSystemProviderQueueTest, Enqueue_OneAtOnce) {
|
| EXPECT_EQ(0, third_abort_counter);
|
| }
|
|
|
| +TEST_F(FileSystemProviderQueueTest, Enqueue_WhilePreviousNotRemoved) {
|
| + Queue queue(1);
|
| + const size_t first_token = queue.NewToken();
|
| + int first_counter = 0;
|
| + int first_abort_counter = 0;
|
| + queue.Enqueue(first_token,
|
| + base::Bind(&OnRun, &first_counter, &first_abort_counter));
|
| +
|
| + base::RunLoop().RunUntilIdle();
|
| + queue.Complete(first_token);
|
| +
|
| + // Enqueuing a new task must not start it, once the queue is filled with a
|
| + // completed task.
|
| + const size_t second_token = queue.NewToken();
|
| + int second_counter = 0;
|
| + int second_abort_counter = 0;
|
| + queue.Enqueue(second_token,
|
| + base::Bind(&OnRun, &second_counter, &second_abort_counter));
|
| +
|
| + base::RunLoop().RunUntilIdle();
|
| + EXPECT_EQ(0, second_counter);
|
| + EXPECT_EQ(0, second_abort_counter);
|
| +}
|
| +
|
| TEST_F(FileSystemProviderQueueTest, Enqueue_MultipleAtOnce) {
|
| Queue queue(2);
|
| const size_t first_token = queue.NewToken();
|
|
|