| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
| 9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 VerifyChangesCommittedDatabase() {} | 56 VerifyChangesCommittedDatabase() {} |
| 57 virtual ~VerifyChangesCommittedDatabase() { | 57 virtual ~VerifyChangesCommittedDatabase() { |
| 58 const string16 kKey(ASCIIToUTF16("key")); | 58 const string16 kKey(ASCIIToUTF16("key")); |
| 59 const string16 kValue(ASCIIToUTF16("value")); | 59 const string16 kValue(ASCIIToUTF16("value")); |
| 60 ValuesMap values; | 60 ValuesMap values; |
| 61 ReadAllValues(&values); | 61 ReadAllValues(&values); |
| 62 EXPECT_EQ(1u, values.size()); | 62 EXPECT_EQ(1u, values.size()); |
| 63 EXPECT_EQ(kValue, values[kKey].string()); | 63 EXPECT_EQ(kValue, values[kKey].string()); |
| 64 } | 64 } |
| 65 }; | 65 }; |
| 66 |
| 67 private: |
| 68 MessageLoop message_loop_; |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 TEST_F(DomStorageAreaTest, DomStorageAreaBasics) { | 71 TEST_F(DomStorageAreaTest, DomStorageAreaBasics) { |
| 69 scoped_refptr<DomStorageArea> area( | 72 scoped_refptr<DomStorageArea> area( |
| 70 new DomStorageArea(1, kOrigin, FilePath(), NULL)); | 73 new DomStorageArea(1, kOrigin, FilePath(), NULL)); |
| 71 string16 old_value; | 74 string16 old_value; |
| 72 NullableString16 old_nullable_value; | 75 NullableString16 old_nullable_value; |
| 73 scoped_refptr<DomStorageArea> copy; | 76 scoped_refptr<DomStorageArea> copy; |
| 74 | 77 |
| 75 // We don't focus on the underlying DomStorageMap functionality | 78 // We don't focus on the underlying DomStorageMap functionality |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 EXPECT_EQ( | 445 EXPECT_EQ( |
| 443 FilePath().AppendASCII("-journal"), | 446 FilePath().AppendASCII("-journal"), |
| 444 DomStorageDatabase::GetJournalFilePath(FilePath())); | 447 DomStorageDatabase::GetJournalFilePath(FilePath())); |
| 445 EXPECT_EQ( | 448 EXPECT_EQ( |
| 446 FilePath().AppendASCII(".extensiononly-journal"), | 449 FilePath().AppendASCII(".extensiononly-journal"), |
| 447 DomStorageDatabase::GetJournalFilePath( | 450 DomStorageDatabase::GetJournalFilePath( |
| 448 FilePath().AppendASCII(".extensiononly"))); | 451 FilePath().AppendASCII(".extensiononly"))); |
| 449 } | 452 } |
| 450 | 453 |
| 451 } // namespace dom_storage | 454 } // namespace dom_storage |
| OLD | NEW |