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

Side by Side Diff: chrome/browser/extensions/settings/settings_frontend_unittest.cc

Issue 10909239: Rename PACKAGED_APP references to LEGACY_PACKAGED_APP (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments Created 8 years, 2 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 (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 "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/file_util.h" 8 #include "base/file_util.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"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 { 133 {
134 ValueStore::ReadResult result = storage->Get(); 134 ValueStore::ReadResult result = storage->Get();
135 ASSERT_FALSE(result->HasError()); 135 ASSERT_FALSE(result->HasError());
136 EXPECT_FALSE(result->settings()->empty()); 136 EXPECT_FALSE(result->settings()->empty());
137 } 137 }
138 } 138 }
139 139
140 TEST_F(ExtensionSettingsFrontendTest, SettingsClearedOnUninstall) { 140 TEST_F(ExtensionSettingsFrontendTest, SettingsClearedOnUninstall) {
141 const std::string id = "ext"; 141 const std::string id = "ext";
142 profile_->GetMockExtensionService()->AddExtensionWithId( 142 profile_->GetMockExtensionService()->AddExtensionWithId(
143 id, Extension::TYPE_PACKAGED_APP); 143 id, Extension::TYPE_LEGACY_PACKAGED_APP);
144 144
145 ValueStore* storage = util::GetStorage(id, frontend_.get()); 145 ValueStore* storage = util::GetStorage(id, frontend_.get());
146 146
147 { 147 {
148 StringValue bar("bar"); 148 StringValue bar("bar");
149 ValueStore::WriteResult result = storage->Set(DEFAULTS, "foo", bar); 149 ValueStore::WriteResult result = storage->Set(DEFAULTS, "foo", bar);
150 ASSERT_FALSE(result->HasError()); 150 ASSERT_FALSE(result->HasError());
151 } 151 }
152 152
153 // This would be triggered by extension uninstall via a DataDeleter. 153 // This would be triggered by extension uninstall via a DataDeleter.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 frontend_->RunWithStorage( 314 frontend_->RunWithStorage(
315 id, settings::SYNC, base::Bind(&UnlimitedSyncStorageTestCallback)); 315 id, settings::SYNC, base::Bind(&UnlimitedSyncStorageTestCallback));
316 frontend_->RunWithStorage( 316 frontend_->RunWithStorage(
317 id, settings::LOCAL, base::Bind(&UnlimitedLocalStorageTestCallback)); 317 id, settings::LOCAL, base::Bind(&UnlimitedLocalStorageTestCallback));
318 318
319 MessageLoop::current()->RunAllPending(); 319 MessageLoop::current()->RunAllPending();
320 } 320 }
321 321
322 } // namespace extensions 322 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698