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

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

Issue 5730004: Rename ExtensionsService to ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 10 years 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 | « chrome/browser/sync/glue/extension_util.cc ('k') | chrome/browser/sync/glue/theme_util.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) 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 "chrome/browser/sync/protocol/extension_specifics.pb.h" 9 #include "chrome/browser/sync/protocol/extension_specifics.pb.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 specifics.set_update_url(kValidUpdateUrl1); 494 specifics.set_update_url(kValidUpdateUrl1);
495 495
496 specifics.set_version(kVersion1); 496 specifics.set_version(kVersion1);
497 EXPECT_FALSE(IsExtensionOutdated(*extension, specifics)); 497 EXPECT_FALSE(IsExtensionOutdated(*extension, specifics));
498 specifics.set_version(kVersion2); 498 specifics.set_version(kVersion2);
499 EXPECT_FALSE(IsExtensionOutdated(*extension, specifics)); 499 EXPECT_FALSE(IsExtensionOutdated(*extension, specifics));
500 specifics.set_version(kVersion3); 500 specifics.set_version(kVersion3);
501 EXPECT_TRUE(IsExtensionOutdated(*extension, specifics)); 501 EXPECT_TRUE(IsExtensionOutdated(*extension, specifics));
502 } 502 }
503 503
504 // TODO(akalin): Make ExtensionsService/ExtensionUpdater testable 504 // TODO(akalin): Make ExtensionService/ExtensionUpdater testable
505 // enough to be able to write a unittest for SetExtensionProperties(). 505 // enough to be able to write a unittest for SetExtensionProperties().
506 506
507 TEST_F(ExtensionUtilTest, MergeExtensionSpecificsWithUserProperties) { 507 TEST_F(ExtensionUtilTest, MergeExtensionSpecificsWithUserProperties) {
508 sync_pb::ExtensionSpecifics merged_specifics; 508 sync_pb::ExtensionSpecifics merged_specifics;
509 merged_specifics.set_id(kValidId); 509 merged_specifics.set_id(kValidId);
510 merged_specifics.set_update_url(kValidUpdateUrl1); 510 merged_specifics.set_update_url(kValidUpdateUrl1);
511 merged_specifics.set_enabled(true); 511 merged_specifics.set_enabled(true);
512 merged_specifics.set_incognito_enabled(false); 512 merged_specifics.set_incognito_enabled(false);
513 merged_specifics.set_version(kVersion2); 513 merged_specifics.set_version(kVersion2);
514 514
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 { 560 {
561 sync_pb::ExtensionSpecifics result = merged_specifics; 561 sync_pb::ExtensionSpecifics result = merged_specifics;
562 MergeExtensionSpecifics(specifics, true, &result); 562 MergeExtensionSpecifics(specifics, true, &result);
563 EXPECT_TRUE(AreExtensionSpecificsEqual(result, specifics)); 563 EXPECT_TRUE(AreExtensionSpecificsEqual(result, specifics));
564 } 564 }
565 } 565 }
566 566
567 } // namespace 567 } // namespace
568 568
569 } // namespace browser_sync 569 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/extension_util.cc ('k') | chrome/browser/sync/glue/theme_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698