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

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

Issue 907533004: [Extensions] Sync the 'allowed scripting on all urls' preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 "chrome/browser/extensions/app_sync_data.h" 5 #include "chrome/browser/extensions/app_sync_data.h"
6 6
7 #include "sync/api/string_ordinal.h" 7 #include "sync/api/string_ordinal.h"
8 #include "sync/protocol/app_specifics.pb.h" 8 #include "sync/protocol/app_specifics.pb.h"
9 #include "sync/protocol/sync.pb.h" 9 #include "sync/protocol/sync.pb.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 11 matching lines...) Expand all
22 ~AppSyncDataTest() override {} 22 ~AppSyncDataTest() override {}
23 23
24 void SetRequiredExtensionValues( 24 void SetRequiredExtensionValues(
25 sync_pb::ExtensionSpecifics* extension_specifics) { 25 sync_pb::ExtensionSpecifics* extension_specifics) {
26 extension_specifics->set_id(kValidId); 26 extension_specifics->set_id(kValidId);
27 extension_specifics->set_update_url(kValidUpdateUrl); 27 extension_specifics->set_update_url(kValidUpdateUrl);
28 extension_specifics->set_version(kValidVersion); 28 extension_specifics->set_version(kValidVersion);
29 extension_specifics->set_enabled(false); 29 extension_specifics->set_enabled(false);
30 extension_specifics->set_incognito_enabled(true); 30 extension_specifics->set_incognito_enabled(true);
31 extension_specifics->set_remote_install(false); 31 extension_specifics->set_remote_install(false);
32 extension_specifics->set_all_urls_enabled(true);
32 extension_specifics->set_installed_by_custodian(false); 33 extension_specifics->set_installed_by_custodian(false);
33 extension_specifics->set_name(kName); 34 extension_specifics->set_name(kName);
34 } 35 }
35 }; 36 };
36 37
37 TEST_F(AppSyncDataTest, SyncDataToExtensionSyncDataForApp) { 38 TEST_F(AppSyncDataTest, SyncDataToExtensionSyncDataForApp) {
38 sync_pb::EntitySpecifics entity; 39 sync_pb::EntitySpecifics entity;
39 sync_pb::AppSpecifics* app_specifics = entity.mutable_app(); 40 sync_pb::AppSpecifics* app_specifics = entity.mutable_app();
40 app_specifics->set_app_launch_ordinal( 41 app_specifics->set_app_launch_ordinal(
41 syncer::StringOrdinal::CreateInitialOrdinal().ToInternalValue()); 42 syncer::StringOrdinal::CreateInitialOrdinal().ToInternalValue());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 syncer::SyncData sync_data = 92 syncer::SyncData sync_data =
92 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity); 93 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
93 94
94 // There should be no issue loading the sync data. 95 // There should be no issue loading the sync data.
95 AppSyncData app_sync_data(sync_data); 96 AppSyncData app_sync_data(sync_data);
96 app_sync_data.GetSyncData(); 97 app_sync_data.GetSyncData();
97 } 98 }
98 99
99 } // namespace extensions 100 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_sync_data.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698