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

Side by Side Diff: extensions/common/file_util_unittest.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 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
« no previous file with comments | « extensions/common/file_util.cc ('k') | extensions/common/manifest_handlers/background_info.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 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 "extensions/common/file_util.h" 5 #include "extensions/common/file_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 scoped_refptr<Extension> LoadExtensionManifest( 45 scoped_refptr<Extension> LoadExtensionManifest(
46 const std::string& manifest_value, 46 const std::string& manifest_value,
47 const base::FilePath& manifest_dir, 47 const base::FilePath& manifest_dir,
48 Manifest::Location location, 48 Manifest::Location location,
49 int extra_flags, 49 int extra_flags,
50 std::string* error) { 50 std::string* error) {
51 JSONStringValueDeserializer deserializer(manifest_value); 51 JSONStringValueDeserializer deserializer(manifest_value);
52 std::unique_ptr<base::Value> result = deserializer.Deserialize(NULL, error); 52 std::unique_ptr<base::Value> result = deserializer.Deserialize(NULL, error);
53 if (!result.get()) 53 if (!result.get())
54 return NULL; 54 return NULL;
55 CHECK_EQ(base::Value::TYPE_DICTIONARY, result->GetType()); 55 CHECK_EQ(base::Value::Type::DICTIONARY, result->GetType());
56 return LoadExtensionManifest(*base::DictionaryValue::From(std::move(result)), 56 return LoadExtensionManifest(*base::DictionaryValue::From(std::move(result)),
57 manifest_dir, location, extra_flags, error); 57 manifest_dir, location, extra_flags, error);
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 typedef testing::Test FileUtilTest; 62 typedef testing::Test FileUtilTest;
63 63
64 TEST_F(FileUtilTest, InstallUninstallGarbageCollect) { 64 TEST_F(FileUtilTest, InstallUninstallGarbageCollect) {
65 base::ScopedTempDir temp; 65 base::ScopedTempDir temp;
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 base::FilePath actual_path = 542 base::FilePath actual_path =
543 extensions::file_util::ExtensionResourceURLToFilePath(url, root_path); 543 extensions::file_util::ExtensionResourceURLToFilePath(url, root_path);
544 EXPECT_EQ(expected_path.value(), actual_path.value()) << 544 EXPECT_EQ(expected_path.value(), actual_path.value()) <<
545 " For the path " << url; 545 " For the path " << url;
546 } 546 }
547 // Remove temp files. 547 // Remove temp files.
548 ASSERT_TRUE(base::DeleteFile(root_path, true)); 548 ASSERT_TRUE(base::DeleteFile(root_path, true));
549 } 549 }
550 550
551 } // namespace extensions 551 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/file_util.cc ('k') | extensions/common/manifest_handlers/background_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698