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

Side by Side Diff: chrome/browser/sync/glue/extension_util_unittest.cc

Issue 3324012: Check for updates for a user script only if it has an update URL. (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « chrome/browser/sync/glue/extension_util.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/sync/glue/extension_util.h" 5 #include "chrome/browser/sync/glue/extension_util.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "base/version.h" 9 #include "base/version.h"
10 #include "chrome/browser/sync/protocol/extension_specifics.pb.h" 10 #include "chrome/browser/sync/protocol/extension_specifics.pb.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 { 87 {
88 FilePath file_path(kExtensionFilePath); 88 FilePath file_path(kExtensionFilePath);
89 Extension extension(file_path); 89 Extension extension(file_path);
90 MakePossiblySyncableExtension(false, GURL(kValidUpdateUrl1), GURL(), 90 MakePossiblySyncableExtension(false, GURL(kValidUpdateUrl1), GURL(),
91 true, Extension::INTERNAL, 0, &extension); 91 true, Extension::INTERNAL, 0, &extension);
92 EXPECT_TRUE(IsExtensionSyncable(extension)); 92 EXPECT_TRUE(IsExtensionSyncable(extension));
93 } 93 }
94 { 94 {
95 FilePath file_path(kExtensionFilePath); 95 FilePath file_path(kExtensionFilePath);
96 Extension extension(file_path); 96 Extension extension(file_path);
97 MakePossiblySyncableExtension(false, GURL(kValidUpdateUrl1), GURL(), true,
98 Extension::INTERNAL, 0, &extension);
99 EXPECT_TRUE(IsExtensionSyncable(extension));
100 }
101 {
102 FilePath file_path(kExtensionFilePath);
103 Extension extension(file_path);
97 MakePossiblySyncableExtension(false, GURL(), GURL(), true, 104 MakePossiblySyncableExtension(false, GURL(), GURL(), true,
98 Extension::INTERNAL, 0, &extension); 105 Extension::INTERNAL, 0, &extension);
99 EXPECT_TRUE(IsExtensionSyncable(extension)); 106 EXPECT_FALSE(IsExtensionSyncable(extension));
100 } 107 }
101 { 108 {
102 FilePath file_path(kExtensionFilePath); 109 FilePath file_path(kExtensionFilePath);
103 Extension extension(file_path); 110 Extension extension(file_path);
104 MakePossiblySyncableExtension(true, GURL(), GURL(), false, 111 MakePossiblySyncableExtension(true, GURL(), GURL(), false,
105 Extension::INTERNAL, 0, &extension); 112 Extension::INTERNAL, 0, &extension);
106 EXPECT_FALSE(IsExtensionSyncable(extension)); 113 EXPECT_FALSE(IsExtensionSyncable(extension));
107 } 114 }
108 // TODO(akalin): Test with a non-empty launch_url once apps are 115 // TODO(akalin): Test with a non-empty launch_url once apps are
109 // enabled by default. 116 // enabled by default.
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 { 474 {
468 sync_pb::ExtensionSpecifics result = merged_specifics; 475 sync_pb::ExtensionSpecifics result = merged_specifics;
469 MergeExtensionSpecifics(specifics, true, &result); 476 MergeExtensionSpecifics(specifics, true, &result);
470 EXPECT_TRUE(AreExtensionSpecificsEqual(result, specifics)); 477 EXPECT_TRUE(AreExtensionSpecificsEqual(result, specifics));
471 } 478 }
472 } 479 }
473 480
474 } // namespace 481 } // namespace
475 482
476 } // namespace browser_sync 483 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/extension_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698