| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/indexed_db/indexed_db_leveldb_coding.h" | 5 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "content/common/indexed_db/indexed_db_key.h" | 14 #include "content/common/indexed_db/indexed_db_key.h" |
| 15 #include "content/common/indexed_db/indexed_db_key_path.h" | 15 #include "content/common/indexed_db/indexed_db_key_path.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 using base::StringPiece; | 18 using base::StringPiece; |
| 19 using WebKit::WebIDBKeyTypeDate; | 19 using blink::WebIDBKeyTypeDate; |
| 20 using WebKit::WebIDBKeyTypeNumber; | 20 using blink::WebIDBKeyTypeNumber; |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 static IndexedDBKey CreateArrayIDBKey() { | 26 static IndexedDBKey CreateArrayIDBKey() { |
| 27 return IndexedDBKey(IndexedDBKey::KeyArray()); | 27 return IndexedDBKey(IndexedDBKey::KeyArray()); |
| 28 } | 28 } |
| 29 | 29 |
| 30 static IndexedDBKey CreateArrayIDBKey(const IndexedDBKey& key1) { | 30 static IndexedDBKey CreateArrayIDBKey(const IndexedDBKey& key1) { |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 std::string vB = WrappedEncodeVarInt(static_cast<int64>(n)); | 842 std::string vB = WrappedEncodeVarInt(static_cast<int64>(n)); |
| 843 | 843 |
| 844 EXPECT_EQ(vA.size(), vB.size()); | 844 EXPECT_EQ(vA.size(), vB.size()); |
| 845 EXPECT_EQ(*vA.begin(), *vB.begin()); | 845 EXPECT_EQ(*vA.begin(), *vB.begin()); |
| 846 } | 846 } |
| 847 } | 847 } |
| 848 | 848 |
| 849 } // namespace | 849 } // namespace |
| 850 | 850 |
| 851 } // namespace content | 851 } // namespace content |
| OLD | NEW |