OLD | NEW |
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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/scoped_temp_dir.h" |
7 #include "base/string_util.h" | 8 #include "base/string_util.h" |
8 #include "base/values.h" | 9 #include "base/values.h" |
9 #include "base/memory/scoped_temp_dir.h" | |
10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
11 #include "chrome/common/extensions/extension_constants.h" | 11 #include "chrome/common/extensions/extension_constants.h" |
12 #include "chrome/common/extensions/extension_unpacker.h" | 12 #include "chrome/common/extensions/extension_unpacker.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
15 | 15 |
16 namespace errors = extension_manifest_errors; | 16 namespace errors = extension_manifest_errors; |
17 namespace keys = extension_manifest_keys; | 17 namespace keys = extension_manifest_keys; |
18 | 18 |
19 class ExtensionUnpackerTest : public testing::Test { | 19 class ExtensionUnpackerTest : public testing::Test { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 EXPECT_TRUE(unpacker_->error_message().empty()); | 102 EXPECT_TRUE(unpacker_->error_message().empty()); |
103 ASSERT_EQ(2U, unpacker_->parsed_catalogs()->size()); | 103 ASSERT_EQ(2U, unpacker_->parsed_catalogs()->size()); |
104 } | 104 } |
105 | 105 |
106 TEST_F(ExtensionUnpackerTest, NoL10n) { | 106 TEST_F(ExtensionUnpackerTest, NoL10n) { |
107 SetupUnpacker("no_l10n.crx"); | 107 SetupUnpacker("no_l10n.crx"); |
108 EXPECT_TRUE(unpacker_->Run()); | 108 EXPECT_TRUE(unpacker_->Run()); |
109 EXPECT_TRUE(unpacker_->error_message().empty()); | 109 EXPECT_TRUE(unpacker_->error_message().empty()); |
110 EXPECT_EQ(0U, unpacker_->parsed_catalogs()->size()); | 110 EXPECT_EQ(0U, unpacker_->parsed_catalogs()->size()); |
111 } | 111 } |
OLD | NEW |