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

Side by Side Diff: chrome/browser/extensions/api/storage/settings_sync_unittest.cc

Issue 16915006: Convert most of extensions and some other random stuff to using the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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/files/scoped_temp_dir.h" 6 #include "base/files/scoped_temp_dir.h"
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "chrome/browser/extensions/api/storage/leveldb_settings_storage_factory .h" 11 #include "chrome/browser/extensions/api/storage/leveldb_settings_storage_factory .h"
12 #include "chrome/browser/extensions/api/storage/settings_frontend.h" 12 #include "chrome/browser/extensions/api/storage/settings_frontend.h"
13 #include "chrome/browser/extensions/api/storage/settings_storage_factory.h" 13 #include "chrome/browser/extensions/api/storage/settings_storage_factory.h"
14 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" 14 #include "chrome/browser/extensions/api/storage/settings_sync_util.h"
15 #include "chrome/browser/extensions/api/storage/settings_test_util.h" 15 #include "chrome/browser/extensions/api/storage/settings_test_util.h"
16 #include "chrome/browser/extensions/api/storage/syncable_settings_storage.h" 16 #include "chrome/browser/extensions/api/storage/syncable_settings_storage.h"
17 #include "chrome/browser/extensions/extension_system.h" 17 #include "chrome/browser/extensions/extension_system.h"
18 #include "chrome/browser/extensions/test_extension_service.h" 18 #include "chrome/browser/extensions/test_extension_service.h"
19 #include "chrome/browser/value_store/testing_value_store.h" 19 #include "chrome/browser/value_store/testing_value_store.h"
20 #include "chrome/common/extensions/manifest.h" 20 #include "chrome/common/extensions/manifest.h"
21 #include "content/public/test/test_browser_thread.h" 21 #include "content/public/test/test_browser_thread.h"
22 #include "sync/api/sync_change_processor.h" 22 #include "sync/api/sync_change_processor.h"
23 #include "sync/api/sync_error_factory.h" 23 #include "sync/api/sync_error_factory.h"
24 #include "sync/api/sync_error_factory_mock.h" 24 #include "sync/api/sync_error_factory_mock.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 using base::DictionaryValue;
28 using base::ListValue;
29 using base::Value;
27 using content::BrowserThread; 30 using content::BrowserThread;
28 31
29 namespace extensions { 32 namespace extensions {
30 33
31 namespace util = settings_test_util; 34 namespace util = settings_test_util;
32 35
33 namespace { 36 namespace {
34 37
35 // To save typing ValueStore::DEFAULTS everywhere. 38 // To save typing ValueStore::DEFAULTS everywhere.
36 const ValueStore::WriteOptions DEFAULTS = ValueStore::DEFAULTS; 39 const ValueStore::WriteOptions DEFAULTS = ValueStore::DEFAULTS;
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 ASSERT_EQ(1u, sync_processor_->changes().size()); 1421 ASSERT_EQ(1u, sync_processor_->changes().size());
1419 SettingSyncData sync_data = sync_processor_->changes()[0]; 1422 SettingSyncData sync_data = sync_processor_->changes()[0];
1420 EXPECT_EQ(syncer::SyncChange::ACTION_ADD, sync_data.change_type()); 1423 EXPECT_EQ(syncer::SyncChange::ACTION_ADD, sync_data.change_type());
1421 EXPECT_EQ("ext", sync_data.extension_id()); 1424 EXPECT_EQ("ext", sync_data.extension_id());
1422 EXPECT_EQ("key.with.spot", sync_data.key()); 1425 EXPECT_EQ("key.with.spot", sync_data.key());
1423 EXPECT_TRUE(sync_data.value().Equals(string_value.get())); 1426 EXPECT_TRUE(sync_data.value().Equals(string_value.get()));
1424 } 1427 }
1425 } 1428 }
1426 1429
1427 } // namespace extensions 1430 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698