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
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_ZUCCHINI_TEST_REFERENCE_READER_H_
6 #define COMPONENTS_ZUCCHINI_TEST_REFERENCE_READER_H_
7 
8 #include <stddef.h>
9 
10 #include <vector>
11 
12 #include "base/optional.h"
13 #include "components/zucchini/image_utils.h"
14 
15 namespace zucchini {
16 
17 // A trivial ReferenceReader that reads injected references.
18 class TestReferenceReader : public ReferenceReader {
19  public:
20   explicit TestReferenceReader(const std::vector<Reference>& refs);
21   ~TestReferenceReader() override;
22 
23   base::Optional<Reference> GetNext() override;
24 
25  private:
26   std::vector<Reference> references_;
27   size_t index_ = 0;
28 };
29 
30 }  // namespace zucchini
31 
32 #endif  // COMPONENTS_ZUCCHINI_TEST_REFERENCE_READER_H_
33