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 "services/shape_detection/barcode_detection_impl_mac.h" | 5 #include "services/shape_detection/barcode_detection_impl_mac.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 #include "base/mac/sdk_forward_declarations.h" | 11 #include "base/mac/sdk_forward_declarations.h" |
| 12 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "ui/gl/gl_switches.h" | 16 #include "ui/gl/gl_switches.h" |
16 | 17 |
17 namespace shape_detection { | 18 namespace shape_detection { |
18 | 19 |
19 ACTION_P(RunClosure, closure) { | 20 ACTION_P(RunClosure, closure) { |
20 closure.Run(); | 21 closure.Run(); |
21 } | 22 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 EXPECT_CALL(*this, Detection(1, kInfoString)) | 96 EXPECT_CALL(*this, Detection(1, kInfoString)) |
96 .WillOnce(RunClosure(quit_closure)); | 97 .WillOnce(RunClosure(quit_closure)); |
97 impl_.Detect(std::move(handle), size.width(), size.height(), | 98 impl_.Detect(std::move(handle), size.width(), size.height(), |
98 base::Bind(&BarcodeDetectionImplMacTest::DetectCallback, | 99 base::Bind(&BarcodeDetectionImplMacTest::DetectCallback, |
99 base::Unretained(this))); | 100 base::Unretained(this))); |
100 | 101 |
101 run_loop.Run(); | 102 run_loop.Run(); |
102 } | 103 } |
103 | 104 |
104 } // shape_detection namespace | 105 } // shape_detection namespace |
OLD | NEW |