| 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/browser/extensions/extension_creator_filter.h" |
| 6 |
| 5 #include <stddef.h> | 7 #include <stddef.h> |
| 6 | 8 |
| 9 #include <memory> |
| 10 |
| 7 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/macros.h" | 13 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 12 #include "chrome/browser/extensions/extension_creator_filter.h" | |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
| 15 | 17 |
| 16 namespace { | 18 namespace { |
| 17 | 19 |
| 18 class ExtensionCreatorFilterTest : public PlatformTest { | 20 class ExtensionCreatorFilterTest : public PlatformTest { |
| 19 protected: | 21 protected: |
| 20 void SetUp() override { | 22 void SetUp() override { |
| 21 PlatformTest::SetUp(); | 23 PlatformTest::SetUp(); |
| 22 | 24 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 SetFileAttributes(test_file.value().c_str(), FILE_ATTRIBUTE_HIDDEN); | 139 SetFileAttributes(test_file.value().c_str(), FILE_ATTRIBUTE_HIDDEN); |
| 138 } | 140 } |
| 139 bool observed = filter_->ShouldPackageFile(test_file); | 141 bool observed = filter_->ShouldPackageFile(test_file); |
| 140 EXPECT_EQ(cases[i].expected, observed) << | 142 EXPECT_EQ(cases[i].expected, observed) << |
| 141 "i: " << i << ", input: " << test_file.value(); | 143 "i: " << i << ", input: " << test_file.value(); |
| 142 } | 144 } |
| 143 } | 145 } |
| 144 #endif | 146 #endif |
| 145 | 147 |
| 146 } // namespace | 148 } // namespace |
| OLD | NEW |