OLD | NEW |
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/resource_metadata_storage.h" | 5 #include "chrome/browser/chromeos/drive/resource_metadata_storage.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
13 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
14 #include "chrome/browser/chromeos/drive/drive.pb.h" | 14 #include "chrome/browser/chromeos/drive/drive.pb.h" |
15 #include "chrome/browser/chromeos/drive/test_util.h" | 15 #include "chrome/browser/chromeos/drive/drive_test_util.h" |
16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 18 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
19 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" | 19 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" |
20 | 20 |
21 namespace drive { | 21 namespace drive { |
22 namespace internal { | 22 namespace internal { |
23 | 23 |
24 class ResourceMetadataStorageTest : public testing::Test { | 24 class ResourceMetadataStorageTest : public testing::Test { |
25 protected: | 25 protected: |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 EXPECT_EQ(FILE_ERROR_OK, storage_->RemoveEntry(key3)); | 624 EXPECT_EQ(FILE_ERROR_OK, storage_->RemoveEntry(key3)); |
625 EXPECT_TRUE(CheckValidity()); | 625 EXPECT_TRUE(CheckValidity()); |
626 | 626 |
627 // Remove key1. | 627 // Remove key1. |
628 EXPECT_EQ(FILE_ERROR_OK, storage_->RemoveEntry(key1)); | 628 EXPECT_EQ(FILE_ERROR_OK, storage_->RemoveEntry(key1)); |
629 EXPECT_TRUE(CheckValidity()); | 629 EXPECT_TRUE(CheckValidity()); |
630 } | 630 } |
631 | 631 |
632 } // namespace internal | 632 } // namespace internal |
633 } // namespace drive | 633 } // namespace drive |
OLD | NEW |