Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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:
35 void SetSnapshotsAndAssets(Settings& settings);
36
37 std::shared_ptr<TestDartNativeResolver> native_resolver_;
39 std::string kernel_filename_;
40 std::string elf_filename_;
43
44 private:
46};
47
48} // namespace flutter::testing
49
50#endif // FLUTTER_TESTING_DART_FIXTURE_H_
void SetSnapshotsAndAssets(Settings &settings)
void AddFfiNativeCallback(const std::string &name, void *callback_ptr)
virtual Settings CreateSettingsForFixture()
void AddNativeCallback(const std::string &name, Dart_NativeFunction callback)
std::shared_ptr< TestDartNativeResolver > native_resolver_
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
Definition dart_api.h:3198
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
DEF_SWITCHES_START aot vmservice shared library name
Definition switches.h:32