Flutter Engine
The Flutter Engine
dart_fixture.h
Go to the documentation of this file.
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_DART_FIXTURE_H_
6#define FLUTTER_TESTING_DART_FIXTURE_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::testing {
18
20 public:
21 // Uses the default filenames from the fixtures generator.
23
24 // Allows to customize the kernel, ELF and split ELF filenames.
25 DartFixture(std::string kernel_filename,
26 std::string elf_filename,
27 std::string elf_split_filename);
28
30
31 void AddNativeCallback(const std::string& name, Dart_NativeFunction callback);
32 void AddFfiNativeCallback(const std::string& name, void* callback_ptr);
33
34 protected:
36
37 std::shared_ptr<TestDartNativeResolver> native_resolver_;
39 std::string kernel_filename_;
40 std::string elf_filename_;
43
44 private:
45 FML_DISALLOW_COPY_AND_ASSIGN(DartFixture);
46};
47
48} // namespace flutter::testing
49
50#endif // FLUTTER_TESTING_DART_FIXTURE_H_
void SetSnapshotsAndAssets(Settings &settings)
Definition: dart_fixture.cc:43
void AddFfiNativeCallback(const std::string &name, void *callback_ptr)
Definition: dart_fixture.cc:80
virtual Settings CreateSettingsForFixture()
Definition: dart_fixture.cc:30
void AddNativeCallback(const std::string &name, Dart_NativeFunction callback)
Definition: dart_fixture.cc:75
std::shared_ptr< TestDartNativeResolver > native_resolver_
Definition: dart_fixture.h:37
ELFAOTSymbols split_aot_symbols_
Definition: dart_fixture.h:38
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
Definition: dart_api.h:3207
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32