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/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/json/json_file_value_serializer.h" | 7 #include "base/json/json_file_value_serializer.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 manifest = manifest.Append(kDataPath); | 67 manifest = manifest.Append(kDataPath); |
68 manifest = manifest.AppendASCII("manifest.json"); | 68 manifest = manifest.AppendASCII("manifest.json"); |
69 | 69 |
70 if (!base::PathExists(manifest)) { | 70 if (!base::PathExists(manifest)) { |
71 LOG(WARNING) << "No test manifest available. Skipping."; | 71 LOG(WARNING) << "No test manifest available. Skipping."; |
72 return; | 72 return; |
73 } | 73 } |
74 | 74 |
75 JSONFileValueDeserializer deserializer(manifest); | 75 JSONFileValueDeserializer deserializer(manifest); |
76 std::string error; | 76 std::string error; |
77 scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>( | 77 |
78 deserializer.Deserialize(NULL, &error))); | 78 scoped_ptr<base::DictionaryValue> root = |
| 79 base::DictionaryValue::From(deserializer.Deserialize(NULL, &error)); |
| 80 |
79 ASSERT_TRUE(root); | 81 ASSERT_TRUE(root); |
80 ASSERT_TRUE(root->IsType(base::Value::TYPE_DICTIONARY)); | 82 ASSERT_TRUE(root->IsType(base::Value::TYPE_DICTIONARY)); |
81 | 83 |
82 // This checks that the whole manifest is compatible. | 84 // This checks that the whole manifest is compatible. |
83 Version version; | 85 Version version; |
84 EXPECT_TRUE(chrome::CheckPepperFlashManifest(*root, &version)); | 86 EXPECT_TRUE(chrome::CheckPepperFlashManifest(*root, &version)); |
85 EXPECT_TRUE(version.IsValid()); | 87 EXPECT_TRUE(version.IsValid()); |
86 } | 88 } |
87 | 89 |
88 } // namespace component_updater | 90 } // namespace component_updater |
OLD | NEW |