OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 class ExtensionSettingsSyncTest : public testing::Test { | 130 class ExtensionSettingsSyncTest : public testing::Test { |
131 public: | 131 public: |
132 ExtensionSettingsSyncTest() | 132 ExtensionSettingsSyncTest() |
133 : ui_thread_(BrowserThread::UI, MessageLoop::current()), | 133 : ui_thread_(BrowserThread::UI, MessageLoop::current()), |
134 file_thread_(BrowserThread::FILE, MessageLoop::current()) {} | 134 file_thread_(BrowserThread::FILE, MessageLoop::current()) {} |
135 | 135 |
136 virtual void SetUp() OVERRIDE { | 136 virtual void SetUp() OVERRIDE { |
137 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 137 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
138 profile_.reset(new MockProfile(temp_dir_.path())); | 138 profile_.reset(new MockProfile(temp_dir_.path())); |
139 frontend_.reset(new SettingsFrontend(profile_.get())); | 139 frontend_.reset(SettingsFrontend::Create(profile_.get())); |
140 } | 140 } |
141 | 141 |
142 virtual void TearDown() OVERRIDE { | 142 virtual void TearDown() OVERRIDE { |
143 frontend_.reset(); | 143 frontend_.reset(); |
144 profile_.reset(); | 144 profile_.reset(); |
145 } | 145 } |
146 | 146 |
147 protected: | 147 protected: |
148 // Adds a record of an extension or app to the extension service, then returns | 148 // Adds a record of an extension or app to the extension service, then returns |
149 // its storage area. | 149 // its storage area. |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 "s2", "bar", value2)); | 581 "s2", "bar", value2)); |
582 | 582 |
583 GetSyncableService(syncable::APP_SETTINGS)-> | 583 GetSyncableService(syncable::APP_SETTINGS)-> |
584 MergeDataAndStartSyncing(syncable::APP_SETTINGS, sync_data, &sync_); | 584 MergeDataAndStartSyncing(syncable::APP_SETTINGS, sync_data, &sync_); |
585 GetSyncableService(syncable::APP_SETTINGS)-> | 585 GetSyncableService(syncable::APP_SETTINGS)-> |
586 StopSyncing(syncable::APP_SETTINGS); | 586 StopSyncing(syncable::APP_SETTINGS); |
587 ASSERT_EQ(0u, sync_.changes().size()); | 587 ASSERT_EQ(0u, sync_.changes().size()); |
588 } | 588 } |
589 | 589 |
590 } // namespace extensions | 590 } // namespace extensions |
OLD | NEW |