OLD | NEW |
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 "base/string_number_conversions.h" | 5 #include "base/string_number_conversions.h" |
6 #include "chrome/browser/chromeos/extensions/file_browser_handler.h" | 6 #include "chrome/browser/chromeos/extensions/file_browser_handler.h" |
7 #include "chrome/common/extensions/extension_builder.h" | 7 #include "chrome/common/extensions/extension_builder.h" |
8 #include "chrome/common/extensions/extension_manifest_constants.h" | 8 #include "chrome/common/extensions/extension_manifest_constants.h" |
9 #include "chrome/common/extensions/manifest_handler.h" | 9 #include "chrome/common/extensions/manifest_handler.h" |
10 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" | 10 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 .Set("files", "main.html")) | 198 .Set("files", "main.html")) |
199 .Build(); | 199 .Build(); |
200 | 200 |
201 // Non component extensions can't ovverride chrome://files/ URL. | 201 // Non component extensions can't ovverride chrome://files/ URL. |
202 LoadAndExpectError(Manifest(manifest_value.get(), "override_files"), | 202 LoadAndExpectError(Manifest(manifest_value.get(), "override_files"), |
203 errors::kInvalidChromeURLOverrides); | 203 errors::kInvalidChromeURLOverrides); |
204 | 204 |
205 // A component extention can override chrome://files/ URL. | 205 // A component extention can override chrome://files/ URL. |
206 std::string error; | 206 std::string error; |
207 LoadExtension(Manifest(manifest_value.get(), "override_files"), | 207 LoadExtension(Manifest(manifest_value.get(), "override_files"), |
208 &error, Extension::COMPONENT, Extension::NO_FLAGS); | 208 &error, extensions::Manifest::COMPONENT, Extension::NO_FLAGS); |
209 #if defined(FILE_MANAGER_EXTENSION) | 209 #if defined(FILE_MANAGER_EXTENSION) |
210 EXPECT_EQ("", error); | 210 EXPECT_EQ("", error); |
211 #else | 211 #else |
212 EXPECT_EQ(std::string(errors::kInvalidChromeURLOverrides), error); | 212 EXPECT_EQ(std::string(errors::kInvalidChromeURLOverrides), error); |
213 #endif | 213 #endif |
214 } | 214 } |
215 | 215 |
216 } // namespace | 216 } // namespace |
OLD | NEW |