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

Side by Side Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 8693005: Remove potentially many static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 std::string error; 926 std::string error;
927 scoped_refptr<Extension> extension; 927 scoped_refptr<Extension> extension;
928 extension = LoadExtension( 928 extension = LoadExtension(
929 "filebrowser_url_override.json", 929 "filebrowser_url_override.json",
930 &error, 930 &error,
931 Extension::COMPONENT, 931 Extension::COMPONENT,
932 Extension::STRICT_ERROR_CHECKS); 932 Extension::STRICT_ERROR_CHECKS);
933 #if defined(FILE_MANAGER_EXTENSION) 933 #if defined(FILE_MANAGER_EXTENSION)
934 EXPECT_EQ("", error); 934 EXPECT_EQ("", error);
935 #else 935 #else
936 EXPECT_EQ(errors::kInvalidChromeURLOverrides, error); 936 EXPECT_EQ(std::string(errors::kInvalidChromeURLOverrides), error);
Ryan Sleevi 2011/11/24 20:13:59 EXPECT_STREQ
937 #endif 937 #endif
938 938
939 // Extensions of other types can't ovverride chrome://files/ URL. 939 // Extensions of other types can't ovverride chrome://files/ URL.
940 LoadAndExpectError("filebrowser_url_override.json", 940 LoadAndExpectError("filebrowser_url_override.json",
941 errors::kInvalidChromeURLOverrides); 941 errors::kInvalidChromeURLOverrides);
942 } 942 }
943 943
944 TEST_F(ExtensionManifestTest, OfflineEnabled) { 944 TEST_F(ExtensionManifestTest, OfflineEnabled) {
945 LoadAndExpectError("offline_enabled_invalid.json", 945 LoadAndExpectError("offline_enabled_invalid.json",
946 errors::kInvalidOfflineEnabled); 946 errors::kInvalidOfflineEnabled);
947 scoped_refptr<Extension> extension_0( 947 scoped_refptr<Extension> extension_0(
948 LoadAndExpectSuccess("offline_enabled_extension.json")); 948 LoadAndExpectSuccess("offline_enabled_extension.json"));
949 EXPECT_TRUE(extension_0->offline_enabled()); 949 EXPECT_TRUE(extension_0->offline_enabled());
950 scoped_refptr<Extension> extension_1( 950 scoped_refptr<Extension> extension_1(
951 LoadAndExpectSuccess("offline_enabled_packaged_app.json")); 951 LoadAndExpectSuccess("offline_enabled_packaged_app.json"));
952 EXPECT_TRUE(extension_1->offline_enabled()); 952 EXPECT_TRUE(extension_1->offline_enabled());
953 scoped_refptr<Extension> extension_2( 953 scoped_refptr<Extension> extension_2(
954 LoadAndExpectSuccess("offline_disabled_packaged_app.json")); 954 LoadAndExpectSuccess("offline_disabled_packaged_app.json"));
955 EXPECT_FALSE(extension_2->offline_enabled()); 955 EXPECT_FALSE(extension_2->offline_enabled());
956 scoped_refptr<Extension> extension_3( 956 scoped_refptr<Extension> extension_3(
957 LoadAndExpectSuccess("offline_default_packaged_app.json")); 957 LoadAndExpectSuccess("offline_default_packaged_app.json"));
958 EXPECT_FALSE(extension_3->offline_enabled()); 958 EXPECT_FALSE(extension_3->offline_enabled());
959 scoped_refptr<Extension> extension_4( 959 scoped_refptr<Extension> extension_4(
960 LoadAndExpectSuccess("offline_enabled_hosted_app.json")); 960 LoadAndExpectSuccess("offline_enabled_hosted_app.json"));
961 EXPECT_TRUE(extension_4->offline_enabled()); 961 EXPECT_TRUE(extension_4->offline_enabled());
962 } 962 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698