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

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

Issue 353493002: Apps&Extensions for supervised users: Add Extension::WAS_INSTALLED_BY_CUSTODIAN flag and proto entry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 virtual ~AppSyncDataTest() {} 22 virtual ~AppSyncDataTest() {}
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_installed_by_custodian(false);
32 extension_specifics->set_name(kName); 33 extension_specifics->set_name(kName);
33 } 34 }
34 }; 35 };
35 36
36 TEST_F(AppSyncDataTest, SyncDataToExtensionSyncDataForApp) { 37 TEST_F(AppSyncDataTest, SyncDataToExtensionSyncDataForApp) {
37 sync_pb::EntitySpecifics entity; 38 sync_pb::EntitySpecifics entity;
38 sync_pb::AppSpecifics* app_specifics = entity.mutable_app(); 39 sync_pb::AppSpecifics* app_specifics = entity.mutable_app();
39 app_specifics->set_app_launch_ordinal( 40 app_specifics->set_app_launch_ordinal(
40 syncer::StringOrdinal::CreateInitialOrdinal().ToInternalValue()); 41 syncer::StringOrdinal::CreateInitialOrdinal().ToInternalValue());
41 app_specifics->set_page_ordinal( 42 app_specifics->set_page_ordinal(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 90
90 syncer::SyncData sync_data = 91 syncer::SyncData sync_data =
91 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity); 92 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
92 93
93 // There should be no issue loading the sync data. 94 // There should be no issue loading the sync data.
94 AppSyncData app_sync_data(sync_data); 95 AppSyncData app_sync_data(sync_data);
95 app_sync_data.GetSyncData(); 96 app_sync_data.GetSyncData();
96 } 97 }
97 98
98 } // namespace extensions 99 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698