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 "chrome/common/extensions/manifest_tests/extension_manifest_test.h" | 5 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" |
6 | 6 |
| 7 #include "extensions/common/manifest_constants.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
9 | 10 |
10 using extensions::Extension; | 11 using extensions::Extension; |
11 | 12 |
12 namespace errors = extension_manifest_errors; | 13 namespace errors = extensions::manifest_errors; |
13 | 14 |
14 TEST_F(ExtensionManifestTest, ManifestVersionError) { | 15 TEST_F(ExtensionManifestTest, ManifestVersionError) { |
15 scoped_ptr<base::DictionaryValue> manifest1(new base::DictionaryValue()); | 16 scoped_ptr<base::DictionaryValue> manifest1(new base::DictionaryValue()); |
16 manifest1->SetString("name", "Miles"); | 17 manifest1->SetString("name", "Miles"); |
17 manifest1->SetString("version", "0.55"); | 18 manifest1->SetString("version", "0.55"); |
18 | 19 |
19 scoped_ptr<base::DictionaryValue> manifest2(manifest1->DeepCopy()); | 20 scoped_ptr<base::DictionaryValue> manifest2(manifest1->DeepCopy()); |
20 manifest2->SetInteger("manifest_version", 1); | 21 manifest2->SetInteger("manifest_version", 1); |
21 | 22 |
22 scoped_ptr<base::DictionaryValue> manifest3(manifest1->DeepCopy()); | 23 scoped_ptr<base::DictionaryValue> manifest3(manifest1->DeepCopy()); |
(...skipping 25 matching lines...) Expand all Loading... |
48 extensions::Manifest::UNPACKED, | 49 extensions::Manifest::UNPACKED, |
49 create_flags); | 50 create_flags); |
50 } else { | 51 } else { |
51 LoadAndExpectSuccess(Manifest(test_data[i].manifest, | 52 LoadAndExpectSuccess(Manifest(test_data[i].manifest, |
52 test_data[i].test_name), | 53 test_data[i].test_name), |
53 extensions::Manifest::UNPACKED, | 54 extensions::Manifest::UNPACKED, |
54 create_flags); | 55 create_flags); |
55 } | 56 } |
56 } | 57 } |
57 } | 58 } |
OLD | NEW |