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

Side by Side Diff: chrome/browser/extensions/platform_app_browsertest.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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/test/test_timeouts.h" 6 #include "base/test/test_timeouts.h"
7 #include "base/threading/platform_thread.h" 7 #include "base/threading/platform_thread.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/automation/automation_util.h" 10 #include "chrome/browser/automation/automation_util.h"
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 889
890 // Clear the registered events to ensure they are updated. 890 // Clear the registered events to ensure they are updated.
891 extension_prefs->SetRegisteredEvents(extension->id(), 891 extension_prefs->SetRegisteredEvents(extension->id(),
892 std::set<std::string>()); 892 std::set<std::string>());
893 893
894 const base::StringValue old_version("1"); 894 const base::StringValue old_version("1");
895 std::string pref_path("extensions.settings."); 895 std::string pref_path("extensions.settings.");
896 pref_path += extension->id(); 896 pref_path += extension->id();
897 pref_path += ".manifest.version"; 897 pref_path += ".manifest.version";
898 extension_prefs->pref_service()->RegisterStringPref( 898 extension_prefs->pref_service()->RegisterStringPref(
899 pref_path.c_str(), std::string(), PrefServiceBase::UNSYNCABLE_PREF); 899 pref_path.c_str(), std::string(), PrefServiceSyncable::UNSYNCABLE_PREF);
900 extension_prefs->pref_service()->Set(pref_path.c_str(), old_version); 900 extension_prefs->pref_service()->Set(pref_path.c_str(), old_version);
901 } 901 }
902 902
903 // Component App Test 3 of 3: simulate a component extension upgrade that 903 // Component App Test 3 of 3: simulate a component extension upgrade that
904 // re-adds the OnLaunched event, and allows the app to be launched. 904 // re-adds the OnLaunched event, and allows the app to be launched.
905 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ComponentAppBackgroundPage) { 905 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ComponentAppBackgroundPage) {
906 CheckExtensionInstalledObserver should_install; 906 CheckExtensionInstalledObserver should_install;
907 // Since we are forcing an upgrade, we need to wait for the load again. 907 // Since we are forcing an upgrade, we need to wait for the load again.
908 content::WindowedNotificationObserver app_loaded_observer( 908 content::WindowedNotificationObserver app_loaded_observer(
909 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 909 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
(...skipping 14 matching lines...) Expand all
924 } 924 }
925 925
926 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Messaging) { 926 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Messaging) {
927 ExtensionApiTest::ResultCatcher result_catcher; 927 ExtensionApiTest::ResultCatcher result_catcher;
928 LoadAndLaunchPlatformApp("messaging/app2"); 928 LoadAndLaunchPlatformApp("messaging/app2");
929 LoadAndLaunchPlatformApp("messaging/app1"); 929 LoadAndLaunchPlatformApp("messaging/app1");
930 EXPECT_TRUE(result_catcher.GetNextResult()); 930 EXPECT_TRUE(result_catcher.GetNextResult());
931 } 931 }
932 932
933 } // namespace extensions 933 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.cc ('k') | chrome/browser/extensions/test_extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698