| Index: content/browser/dom_storage/local_storage_context_mojo_unittest.cc
|
| diff --git a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
|
| index 81f6b5707a4316460a759bf8caf2cecd1b7341a9..0da3bd685ccdf113802fae711815f948c70a3cc7 100644
|
| --- a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
|
| +++ b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
|
| @@ -72,6 +72,7 @@ TEST_F(LocalStorageContextMojoTest, Basic) {
|
| wrapper.reset();
|
|
|
| base::RunLoop().RunUntilIdle();
|
| +
|
| ASSERT_EQ(2u, mock_data().size());
|
| EXPECT_EQ(value, mock_data().rbegin()->second);
|
| }
|
| @@ -134,4 +135,23 @@ TEST_F(LocalStorageContextMojoTest, InvalidVersion) {
|
| EXPECT_FALSE(success);
|
| }
|
|
|
| +TEST_F(LocalStorageContextMojoTest, VersionOnlyWrittenOnCommit) {
|
| + mojom::LevelDBWrapperPtr wrapper;
|
| + context()->OpenLocalStorage(url::Origin(GURL("http://foobar.com")),
|
| + MakeRequest(&wrapper));
|
| +
|
| + base::RunLoop run_loop;
|
| + bool success = false;
|
| + std::vector<uint8_t> result;
|
| + wrapper->Get(
|
| + StdStringToUint8Vector("key"),
|
| + base::Bind(&GetCallback, run_loop.QuitClosure(), &success, &result));
|
| + run_loop.Run();
|
| + EXPECT_FALSE(success);
|
| + wrapper.reset();
|
| +
|
| + base::RunLoop().RunUntilIdle();
|
| + EXPECT_TRUE(mock_data().empty());
|
| +}
|
| +
|
| } // namespace content
|
|
|