1// Copyright 2013 The Flutter 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 FLUTTER_TESTING_FIXTURE_TEST_H_
6#define FLUTTER_TESTING_FIXTURE_TEST_H_
7
8#include <memory>
9
10#include "flutter/common/settings.h"
11#include "flutter/runtime/dart_vm.h"
12#include "flutter/testing/elf_loader.h"
13#include "flutter/testing/test_dart_native_resolver.h"
14#include "flutter/testing/testing.h"
15#include "flutter/testing/thread_test.h"
16
17namespace flutter {
18namespace testing {
19
20class FixtureTest : public ThreadTest {
21 public:
22 FixtureTest();
23
24 virtual Settings CreateSettingsForFixture();
25
26 void AddNativeCallback(std::string name, Dart_NativeFunction callback);
27
28 protected:
29 void SetSnapshotsAndAssets(Settings& settings);
30
31 std::shared_ptr<TestDartNativeResolver> native_resolver_;
32
33 private:
34 fml::UniqueFD assets_dir_;
35 ELFAOTSymbols aot_symbols_;
36
37 FML_DISALLOW_COPY_AND_ASSIGN(FixtureTest);
38};
39
40} // namespace testing
41} // namespace flutter
42
43#endif // FLUTTER_TESTING_FIXTURE_TEST_H_
44