| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 " \"features\": [\"" + base::JoinString(features, "\", \"") + "\"]\n" | 69 " \"features\": [\"" + base::JoinString(features, "\", \"") + "\"]\n" |
| 70 " }\n" | 70 " }\n" |
| 71 " ]\n" | 71 " ]\n" |
| 72 "}"; | 72 "}"; |
| 73 gpu::GPUInfo gpu_info; | 73 gpu::GPUInfo gpu_info; |
| 74 content::GpuDataManager::GetInstance()->InitializeForTesting( | 74 content::GpuDataManager::GetInstance()->InitializeForTesting( |
| 75 json_blacklist, gpu_info); | 75 json_blacklist, gpu_info); |
| 76 } | 76 } |
| 77 | 77 |
| 78 protected: | 78 protected: |
| 79 scoped_ptr<RequirementsChecker> checker_; | 79 std::unique_ptr<RequirementsChecker> checker_; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 IN_PROC_BROWSER_TEST_F(RequirementsCheckerBrowserTest, CheckEmptyExtension) { | 82 IN_PROC_BROWSER_TEST_F(RequirementsCheckerBrowserTest, CheckEmptyExtension) { |
| 83 scoped_refptr<const Extension> extension( | 83 scoped_refptr<const Extension> extension( |
| 84 LoadExtensionFromDirName("no_requirements")); | 84 LoadExtensionFromDirName("no_requirements")); |
| 85 ASSERT_TRUE(extension.get()); | 85 ASSERT_TRUE(extension.get()); |
| 86 checker_->Check(extension, base::Bind( | 86 checker_->Check(extension, base::Bind( |
| 87 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 87 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
| 88 base::Unretained(this), std::vector<std::string>())); | 88 base::Unretained(this), std::vector<std::string>())); |
| 89 content::RunAllBlockingPoolTasksUntilIdle(); | 89 content::RunAllBlockingPoolTasksUntilIdle(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); | 157 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); |
| 158 } | 158 } |
| 159 | 159 |
| 160 checker_->Check(extension, base::Bind( | 160 checker_->Check(extension, base::Bind( |
| 161 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 161 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
| 162 base::Unretained(this), expected_errors)); | 162 base::Unretained(this), expected_errors)); |
| 163 content::RunAllBlockingPoolTasksUntilIdle(); | 163 content::RunAllBlockingPoolTasksUntilIdle(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace extensions | 166 } // namespace extensions |
| OLD | NEW |