| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "extensions/browser/requirements_checker.h" | 5 #include "extensions/browser/requirements_checker.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Tests a requirement that might fail asynchronously. | 159 // Tests a requirement that might fail asynchronously. |
| 160 TEST_F(RequirementsCheckerTest, RequirementsFailWebGL) { | 160 TEST_F(RequirementsCheckerTest, RequirementsFailWebGL) { |
| 161 content::GpuDataManager::GetInstance()->BlacklistWebGLForTesting(); | 161 content::GpuDataManager::GetInstance()->BlacklistWebGLForTesting(); |
| 162 RequireFeature(kFeatureWebGL); | 162 RequireFeature(kFeatureWebGL); |
| 163 CreateExtension(); | 163 CreateExtension(); |
| 164 StartChecker(); | 164 StartChecker(); |
| 165 | 165 |
| 166 // TODO(michaelpg): Check that the runner actually finishes, which requires | 166 // TODO(michaelpg): Check that the runner actually finishes, which requires |
| 167 // waiting for the GPU check to succeed: crbug.com/706204. | 167 // waiting for the GPU check to succeed: crbug.com/706204. |
| 168 runner_.WaitForIdle(); | |
| 169 if (runner_.errors().size()) { | 168 if (runner_.errors().size()) { |
| 170 EXPECT_THAT(runner_.errors(), testing::UnorderedElementsAre( | 169 EXPECT_THAT(runner_.errors(), testing::UnorderedElementsAre( |
| 171 PreloadCheck::WEBGL_NOT_SUPPORTED)); | 170 PreloadCheck::WEBGL_NOT_SUPPORTED)); |
| 172 EXPECT_FALSE(checker_->GetErrorMessage().empty()); | 171 EXPECT_FALSE(checker_->GetErrorMessage().empty()); |
| 173 } | 172 } |
| 174 } | 173 } |
| 175 | 174 |
| 176 } // namespace extensions | 175 } // namespace extensions |
| OLD | NEW |