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

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

Issue 1301883002: Revert of base: Remove using:: declaration from version.h header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/extension_sync_data.h" 5 #include "chrome/browser/extensions/extension_sync_data.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/version.h" 9 #include "base/version.h"
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // the same result, but don't know that it's right). 103 // the same result, but don't know that it's right).
104 ExtensionSyncData extension_sync_data; 104 ExtensionSyncData extension_sync_data;
105 extension_sync_data.PopulateFromExtensionSpecifics(*extension_specifics); 105 extension_sync_data.PopulateFromExtensionSpecifics(*extension_specifics);
106 EXPECT_EQ(kValidId, extension_sync_data.id()); 106 EXPECT_EQ(kValidId, extension_sync_data.id());
107 EXPECT_EQ(GURL(kValidUpdateUrl), extension_sync_data.update_url()); 107 EXPECT_EQ(GURL(kValidUpdateUrl), extension_sync_data.update_url());
108 EXPECT_FALSE(extension_sync_data.enabled()); 108 EXPECT_FALSE(extension_sync_data.enabled());
109 EXPECT_EQ(true, extension_sync_data.incognito_enabled()); 109 EXPECT_EQ(true, extension_sync_data.incognito_enabled());
110 EXPECT_FALSE(extension_sync_data.remote_install()); 110 EXPECT_FALSE(extension_sync_data.remote_install());
111 EXPECT_EQ(ExtensionSyncData::BOOLEAN_TRUE, 111 EXPECT_EQ(ExtensionSyncData::BOOLEAN_TRUE,
112 extension_sync_data.all_urls_enabled()); 112 extension_sync_data.all_urls_enabled());
113 EXPECT_TRUE(base::Version(kVersion).Equals(extension_sync_data.version())); 113 EXPECT_TRUE(Version(kVersion).Equals(extension_sync_data.version()));
114 EXPECT_EQ(std::string(kName), extension_sync_data.name()); 114 EXPECT_EQ(std::string(kName), extension_sync_data.name());
115 115
116 // Check the serialize-deserialize process for ExtensionSyncData to proto. 116 // Check the serialize-deserialize process for ExtensionSyncData to proto.
117 SyncDataToProtobufEqual(extension_sync_data); 117 SyncDataToProtobufEqual(extension_sync_data);
118 118
119 // The most important thing to test is the "all urls" bit, since it is a 119 // The most important thing to test is the "all urls" bit, since it is a
120 // tri-state boolean (and thus has more logic). Also flip another bit for a 120 // tri-state boolean (and thus has more logic). Also flip another bit for a
121 // sanity check. 121 // sanity check.
122 extension_specifics->set_all_urls_enabled(false); 122 extension_specifics->set_all_urls_enabled(false);
123 extension_specifics->set_incognito_enabled(false); 123 extension_specifics->set_incognito_enabled(false);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity); 221 syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
222 222
223 // There should be no issue loading the sync data. 223 // There should be no issue loading the sync data.
224 scoped_ptr<ExtensionSyncData> app_sync_data = 224 scoped_ptr<ExtensionSyncData> app_sync_data =
225 ExtensionSyncData::CreateFromSyncData(sync_data); 225 ExtensionSyncData::CreateFromSyncData(sync_data);
226 ASSERT_TRUE(app_sync_data.get()); 226 ASSERT_TRUE(app_sync_data.get());
227 app_sync_data->GetSyncData(); 227 app_sync_data->GetSyncData();
228 } 228 }
229 229
230 } // namespace extensions 230 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_sync_data.cc ('k') | chrome/browser/extensions/external_policy_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698