Flutter Engine
fixture_test.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_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 
17 namespace flutter {
18 namespace testing {
19 
20 class FixtureTest : public ThreadTest {
21  public:
22  FixtureTest();
23 
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_
virtual Settings CreateSettingsForFixture()
Definition: fixture_test.cc:17
std::shared_ptr< TestDartNativeResolver > native_resolver_
Definition: fixture_test.h:31
A fixture that creates threads with running message loops that are terminated when the test is done (...
Definition: thread_test.h:27
const char * name
Definition: fuchsia.cc:50
void AddNativeCallback(std::string name, Dart_NativeFunction callback)
Definition: fixture_test.cc:58
void SetSnapshotsAndAssets(Settings &settings)
Definition: fixture_test.cc:30