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

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

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
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_sorting.h" 5 #include "chrome/browser/extensions/extension_sorting.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "chrome/browser/extensions/extension_prefs_unittest.h" 9 #include "chrome/browser/extensions/extension_prefs_unittest.h"
10 #include "chrome/common/extensions/extension_manifest_constants.h" 10 #include "chrome/common/extensions/extension_manifest_constants.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 DictionaryValue simple_dict; 800 DictionaryValue simple_dict;
801 simple_dict.SetString(keys::kVersion, "1.0.0.0"); 801 simple_dict.SetString(keys::kVersion, "1.0.0.0");
802 simple_dict.SetString(keys::kName, name); 802 simple_dict.SetString(keys::kName, name);
803 simple_dict.SetString(keys::kApp, "true"); 803 simple_dict.SetString(keys::kApp, "true");
804 simple_dict.SetString(keys::kLaunchLocalPath, "fake.html"); 804 simple_dict.SetString(keys::kLaunchLocalPath, "fake.html");
805 805
806 std::string errors; 806 std::string errors;
807 scoped_refptr<Extension> app = Extension::Create( 807 scoped_refptr<Extension> app = Extension::Create(
808 prefs_.temp_dir().AppendASCII(name), Manifest::EXTERNAL_PREF, 808 prefs_.temp_dir().AppendASCII(name), Manifest::EXTERNAL_PREF,
809 simple_dict, Extension::NO_FLAGS, &errors); 809 simple_dict, Extension::NO_FLAGS, &errors);
810 EXPECT_TRUE(app) << errors; 810 EXPECT_TRUE(app.get()) << errors;
811 EXPECT_TRUE(Extension::IdIsValid(app->id())); 811 EXPECT_TRUE(Extension::IdIsValid(app->id()));
812 return app; 812 return app;
813 } 813 }
814 814
815 void InitDefaultOrdinals() { 815 void InitDefaultOrdinals() {
816 default_page_ordinal_ = 816 default_page_ordinal_ =
817 syncer::StringOrdinal::CreateInitialOrdinal().CreateAfter(); 817 syncer::StringOrdinal::CreateInitialOrdinal().CreateAfter();
818 default_app_launch_ordinal_ = 818 default_app_launch_ordinal_ =
819 syncer::StringOrdinal::CreateInitialOrdinal().CreateBefore(); 819 syncer::StringOrdinal::CreateInitialOrdinal().CreateBefore();
820 } 820 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 extension_sorting->SetAppLaunchOrdinal(yet_another_app_->id(), 945 extension_sorting->SetAppLaunchOrdinal(yet_another_app_->id(),
946 default_app_launch_ordinal_); 946 default_app_launch_ordinal_);
947 } 947 }
948 948
949 private: 949 private:
950 scoped_refptr<Extension> other_app_; 950 scoped_refptr<Extension> other_app_;
951 scoped_refptr<Extension> yet_another_app_; 951 scoped_refptr<Extension> yet_another_app_;
952 }; 952 };
953 TEST_F(ExtensionSortingDefaultOrdinalNoCollision, 953 TEST_F(ExtensionSortingDefaultOrdinalNoCollision,
954 ExtensionSortingDefaultOrdinalNoCollision) {} 954 ExtensionSortingDefaultOrdinalNoCollision) {}
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/extension_special_storage_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698