| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #import "ios/chrome/browser/suggestions/ios_image_decoder_impl.h" | 5 #import "ios/chrome/browser/suggestions/ios_image_decoder_impl.h" |
| 6 | 6 |
| 7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "base/threading/sequenced_worker_pool.h" |
| 12 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
| 15 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
| 16 | 17 |
| 17 #if !defined(__has_feature) || !__has_feature(objc_arc) | 18 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 18 #error "This file requires ARC support." | 19 #error "This file requires ARC support." |
| 19 #endif | 20 #endif |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 image_data, base::Bind(&IOSImageDecoderImplTest::OnImageDecoded, | 100 image_data, base::Bind(&IOSImageDecoderImplTest::OnImageDecoded, |
| 100 base::Unretained(this))); | 101 base::Unretained(this))); |
| 101 | 102 |
| 102 pool_->FlushForTesting(); | 103 pool_->FlushForTesting(); |
| 103 base::RunLoop().RunUntilIdle(); | 104 base::RunLoop().RunUntilIdle(); |
| 104 | 105 |
| 105 EXPECT_FALSE(decoded_image_.IsEmpty()); | 106 EXPECT_FALSE(decoded_image_.IsEmpty()); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace suggestions | 109 } // namespace suggestions |
| OLD | NEW |