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

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

Issue 264933005: Add remote_install flag to extension sync data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 7 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_sync_data.h » ('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 10 matching lines...) Expand all
21 AppSyncDataTest() {} 21 AppSyncDataTest() {}
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_name(kName); 32 extension_specifics->set_name(kName);
32 } 33 }
33 }; 34 };
34 35
35 TEST_F(AppSyncDataTest, SyncDataToExtensionSyncDataForApp) { 36 TEST_F(AppSyncDataTest, SyncDataToExtensionSyncDataForApp) {
36 sync_pb::EntitySpecifics entity; 37 sync_pb::EntitySpecifics entity;
37 sync_pb::AppSpecifics* app_specifics = entity.mutable_app(); 38 sync_pb::AppSpecifics* app_specifics = entity.mutable_app();
38 app_specifics->set_app_launch_ordinal( 39 app_specifics->set_app_launch_ordinal(
39 syncer::StringOrdinal::CreateInitialOrdinal().ToInternalValue()); 40 syncer::StringOrdinal::CreateInitialOrdinal().ToInternalValue());
40 app_specifics->set_page_ordinal( 41 app_specifics->set_page_ordinal(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 89
89 syncer::SyncData sync_data = 90 syncer::SyncData sync_data =
90 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity); 91 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
91 92
92 // There should be no issue loading the sync data. 93 // There should be no issue loading the sync data.
93 AppSyncData app_sync_data(sync_data); 94 AppSyncData app_sync_data(sync_data);
94 app_sync_data.GetSyncData(); 95 app_sync_data.GetSyncData();
95 } 96 }
96 97
97 } // namespace extensions 98 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sync_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698