OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/leveldb_wrapper_impl.h" | 5 #include "content/browser/leveldb_wrapper_impl.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
8 #include "components/leveldb/public/cpp/util.h" | 9 #include "components/leveldb/public/cpp/util.h" |
9 #include "content/public/test/test_browser_thread_bundle.h" | 10 #include "content/public/test/test_browser_thread_bundle.h" |
10 #include "content/test/mock_leveldb_database.h" | 11 #include "content/test/mock_leveldb_database.h" |
11 #include "mojo/public/cpp/bindings/associated_binding.h" | 12 #include "mojo/public/cpp/bindings/associated_binding.h" |
12 #include "mojo/public/cpp/bindings/strong_associated_binding.h" | 13 #include "mojo/public/cpp/bindings/strong_associated_binding.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 using leveldb::StdStringToUint8Vector; | 16 using leveldb::StdStringToUint8Vector; |
16 using leveldb::Uint8VectorToStdString; | 17 using leveldb::Uint8VectorToStdString; |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 // Reducing size should also succeed. | 420 // Reducing size should also succeed. |
420 value.clear(); | 421 value.clear(); |
421 EXPECT_TRUE(PutSync(key, value)); | 422 EXPECT_TRUE(PutSync(key, value)); |
422 | 423 |
423 // Increasing size should fail. | 424 // Increasing size should fail. |
424 value.resize(1, 'a'); | 425 value.resize(1, 'a'); |
425 EXPECT_FALSE(PutSync(key, value)); | 426 EXPECT_FALSE(PutSync(key, value)); |
426 } | 427 } |
427 | 428 |
428 } // namespace content | 429 } // namespace content |
OLD | NEW |