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

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

Issue 481433005: Extensions: Move id_util functions to crx_file component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert last patchset. function returns Extension* and can't use an assert. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chrome_app_sorting.h" 5 #include "chrome/browser/extensions/chrome_app_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_constants.h" 10 #include "chrome/common/extensions/extension_constants.h"
11 #include "components/crx_file/id_util.h"
11 #include "extensions/common/manifest_constants.h" 12 #include "extensions/common/manifest_constants.h"
12 #include "sync/api/string_ordinal.h" 13 #include "sync/api/string_ordinal.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 namespace extensions { 16 namespace extensions {
16 17
17 namespace keys = manifest_keys; 18 namespace keys = manifest_keys;
18 19
19 class ChromeAppSortingTest : public ExtensionPrefsTest { 20 class ChromeAppSortingTest : public ExtensionPrefsTest {
20 protected: 21 protected:
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 simple_dict.SetString(keys::kVersion, "1.0.0.0"); 807 simple_dict.SetString(keys::kVersion, "1.0.0.0");
807 simple_dict.SetString(keys::kName, name); 808 simple_dict.SetString(keys::kName, name);
808 simple_dict.SetString(keys::kApp, "true"); 809 simple_dict.SetString(keys::kApp, "true");
809 simple_dict.SetString(keys::kLaunchLocalPath, "fake.html"); 810 simple_dict.SetString(keys::kLaunchLocalPath, "fake.html");
810 811
811 std::string errors; 812 std::string errors;
812 scoped_refptr<Extension> app = Extension::Create( 813 scoped_refptr<Extension> app = Extension::Create(
813 prefs_.temp_dir().AppendASCII(name), Manifest::EXTERNAL_PREF, 814 prefs_.temp_dir().AppendASCII(name), Manifest::EXTERNAL_PREF,
814 simple_dict, Extension::NO_FLAGS, &errors); 815 simple_dict, Extension::NO_FLAGS, &errors);
815 EXPECT_TRUE(app.get()) << errors; 816 EXPECT_TRUE(app.get()) << errors;
816 EXPECT_TRUE(Extension::IdIsValid(app->id())); 817 EXPECT_TRUE(crx_file::id_util::IdIsValid(app->id()));
817 return app; 818 return app;
818 } 819 }
819 820
820 void InitDefaultOrdinals() { 821 void InitDefaultOrdinals() {
821 default_page_ordinal_ = 822 default_page_ordinal_ =
822 syncer::StringOrdinal::CreateInitialOrdinal().CreateAfter(); 823 syncer::StringOrdinal::CreateInitialOrdinal().CreateAfter();
823 default_app_launch_ordinal_ = 824 default_app_launch_ordinal_ =
824 syncer::StringOrdinal::CreateInitialOrdinal().CreateBefore(); 825 syncer::StringOrdinal::CreateInitialOrdinal().CreateBefore();
825 } 826 }
826 827
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 992
992 private: 993 private:
993 scoped_refptr<Extension> first_app_; 994 scoped_refptr<Extension> first_app_;
994 scoped_refptr<Extension> second_app_; 995 scoped_refptr<Extension> second_app_;
995 }; 996 };
996 TEST_F(ChromeAppSortingSetExtensionVisible, 997 TEST_F(ChromeAppSortingSetExtensionVisible,
997 ChromeAppSortingSetExtensionVisible) { 998 ChromeAppSortingSetExtensionVisible) {
998 } 999 }
999 1000
1000 } // namespace extensions 1001 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/webstore_private/webstore_private_api.cc ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698