Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1262)

Side by Side Diff: extensions/browser/value_store/leveldb_value_store_unittest.cc

Issue 535673004: Gallery: Fix scrolling by touch in the mosaic view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/value_store/value_store_unittest.h" 5 #include "extensions/browser/value_store/value_store_unittest.h"
6 6
7 #include "base/file_util.h"
8 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "content/public/test/test_browser_thread_bundle.h" 13 #include "content/public/test/test_browser_thread_bundle.h"
14 #include "extensions/browser/value_store/leveldb_value_store.h" 14 #include "extensions/browser/value_store/leveldb_value_store.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "third_party/leveldatabase/src/include/leveldb/db.h" 16 #include "third_party/leveldatabase/src/include/leveldb/db.h"
17 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" 17 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
18 18
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ValueStore::ReadResult result = store()->Get(); 175 ValueStore::ReadResult result = store()->Get();
176 ASSERT_TRUE(result->HasError()); 176 ASSERT_TRUE(result->HasError());
177 ASSERT_EQ(ValueStore::CORRUPTION, result->error().code); 177 ASSERT_EQ(ValueStore::CORRUPTION, result->error().code);
178 178
179 ASSERT_TRUE(store()->Restore()); 179 ASSERT_TRUE(store()->Restore());
180 result = store()->Get(); 180 result = store()->Get();
181 EXPECT_FALSE(result->HasError()); 181 EXPECT_FALSE(result->HasError());
182 // We couldn't recover anything, but we should be in a sane state again. 182 // We couldn't recover anything, but we should be in a sane state again.
183 EXPECT_EQ(0u, result->settings().size()); 183 EXPECT_EQ(0u, result->settings().size());
184 } 184 }
OLDNEW
« no previous file with comments | « extensions/browser/value_store/leveldb_value_store.cc ('k') | extensions/browser/value_store/value_store_frontend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698