Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
flutter::testing::DartPersistentHandleTest Class Reference
Inheritance diagram for flutter::testing::DartPersistentHandleTest:
flutter::testing::FixtureTest flutter::testing::DartFixture flutter::testing::ThreadTest

Public Member Functions

 DartPersistentHandleTest ()
 
 ~DartPersistentHandleTest ()=default
 
bool RunWithEntrypoint (const std::string &entrypoint)
 
- Public Member Functions inherited from flutter::testing::FixtureTest
 FixtureTest ()
 
 FixtureTest (std::string kernel_filename, std::string elf_filename, std::string elf_split_filename)
 
- Public Member Functions inherited from flutter::testing::DartFixture
 DartFixture ()
 
 DartFixture (std::string kernel_filename, std::string elf_filename, std::string elf_split_filename)
 
virtual Settings CreateSettingsForFixture ()
 
void AddNativeCallback (const std::string &name, Dart_NativeFunction callback)
 
void AddFfiNativeCallback (const std::string &name, void *callback_ptr)
 
- Public Member Functions inherited from flutter::testing::ThreadTest
 ThreadTest ()
 
fml::RefPtr< fml::TaskRunnerGetCurrentTaskRunner ()
 Get the task runner for the thread that the current unit-test is running on. This creates a message loop as necessary. More...
 
fml::RefPtr< fml::TaskRunnerCreateNewThread (const std::string &name="")
 Creates a new thread, initializes a message loop on it, and, returns its task runner to the unit-test. The message loop is terminated (and its thread joined) when the test ends. This allows tests to create multiple named threads as necessary. More...
 

Protected Member Functions

 FML_DISALLOW_COPY_AND_ASSIGN (DartPersistentHandleTest)
 
- Protected Member Functions inherited from flutter::testing::DartFixture
void SetSnapshotsAndAssets (Settings &settings)
 

Protected Attributes

Settings settings_
 
DartVMRef vm_
 
std::unique_ptr< AutoIsolateShutdownrunning_isolate_
 
fml::RefPtr< fml::TaskRunnerthread_
 
TaskRunners task_runners_
 
- Protected Attributes inherited from flutter::testing::DartFixture
std::shared_ptr< TestDartNativeResolvernative_resolver_
 
ELFAOTSymbols split_aot_symbols_
 
std::string kernel_filename_
 
std::string elf_filename_
 
fml::UniqueFD assets_dir_
 
ELFAOTSymbols aot_symbols_
 

Detailed Description

Definition at line 11 of file dart_persistent_handle_unittest.cc.

Constructor & Destructor Documentation

◆ DartPersistentHandleTest()

flutter::testing::DartPersistentHandleTest::DartPersistentHandleTest ( )
inline

Definition at line 13 of file dart_persistent_handle_unittest.cc.

18 thread_,
19 thread_,
20 thread_,
21 thread_) {}
static DartVMRef Create(const Settings &settings, fml::RefPtr< const DartSnapshot > vm_snapshot=nullptr, fml::RefPtr< const DartSnapshot > isolate_snapshot=nullptr)
virtual Settings CreateSettingsForFixture()
Definition: dart_fixture.cc:30
fml::RefPtr< fml::TaskRunner > CreateNewThread(const std::string &name="")
Creates a new thread, initializes a message loop on it, and, returns its task runner to the unit-test...
Definition: thread_test.cc:26
std::string GetCurrentTestName()
Gets the name of the currently running test. This is useful in generating logs or assets based on tes...
Definition: testing.cc:15

◆ ~DartPersistentHandleTest()

flutter::testing::DartPersistentHandleTest::~DartPersistentHandleTest ( )
default

Member Function Documentation

◆ FML_DISALLOW_COPY_AND_ASSIGN()

flutter::testing::DartPersistentHandleTest::FML_DISALLOW_COPY_AND_ASSIGN ( DartPersistentHandleTest  )
protected

◆ RunWithEntrypoint()

bool flutter::testing::DartPersistentHandleTest::RunWithEntrypoint ( const std::string &  entrypoint)
inline

Definition at line 25 of file dart_persistent_handle_unittest.cc.

25 {
26 if (running_isolate_) {
27 return false;
28 }
29 auto isolate =
32 if (!isolate || isolate->get()->GetPhase() != DartIsolate::Phase::Running) {
33 return false;
34 }
35
36 running_isolate_ = std::move(isolate);
37 return true;
38 }
std::unique_ptr< AutoIsolateShutdown > running_isolate_
std::string GetDefaultKernelFilePath()
Returns the default path to kernel_blob.bin. This file is within the directory returned by GetFixture...
Definition: testing.cc:19
std::unique_ptr< AutoIsolateShutdown > RunDartCodeInIsolate(DartVMRef &vm_ref, const Settings &settings, const TaskRunners &task_runners, std::string entrypoint, const std::vector< std::string > &args, const std::string &kernel_file_path, fml::WeakPtr< IOManager > io_manager, std::shared_ptr< VolatilePathTracker > volatile_path_tracker, std::unique_ptr< PlatformConfiguration > platform_configuration)

Member Data Documentation

◆ running_isolate_

std::unique_ptr<AutoIsolateShutdown> flutter::testing::DartPersistentHandleTest::running_isolate_
protected

Definition at line 43 of file dart_persistent_handle_unittest.cc.

◆ settings_

Settings flutter::testing::DartPersistentHandleTest::settings_
protected

Definition at line 41 of file dart_persistent_handle_unittest.cc.

◆ task_runners_

TaskRunners flutter::testing::DartPersistentHandleTest::task_runners_
protected

Definition at line 45 of file dart_persistent_handle_unittest.cc.

◆ thread_

fml::RefPtr<fml::TaskRunner> flutter::testing::DartPersistentHandleTest::thread_
protected

Definition at line 44 of file dart_persistent_handle_unittest.cc.

◆ vm_

DartVMRef flutter::testing::DartPersistentHandleTest::vm_
protected

Definition at line 42 of file dart_persistent_handle_unittest.cc.


The documentation for this class was generated from the following file: