53 AddNativeCallback(
"GiveObjectToNative",
55 auto handle = Dart_GetNativeArgument(
args, 0);
58 ASSERT_TRUE(dart_state);
60 persistent_value.Set(dart_state, handle);
65 ASSERT_TRUE(RunWithEntrypoint(
"callGiveObjectToNative"));
68 running_isolate_->Shutdown();
72 persistent_value.Clear();
virtual Settings CreateSettingsForFixture()
std::unique_ptr< AutoIsolateShutdown > running_isolate_
fml::RefPtr< fml::TaskRunner > thread_
DartPersistentHandleTest()
bool RunWithEntrypoint(const std::string &entrypoint)
FML_DISALLOW_COPY_AND_ASSIGN(DartPersistentHandleTest)
~DartPersistentHandleTest()=default
TaskRunners task_runners_
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...
static DartState * Current()
TaskRunners task_runners_
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
std::string GetCurrentTestName()
Gets the name of the currently running test. This is useful in generating logs or assets based on tes...
TEST_F(DisplayListTest, Defaults)
std::string GetDefaultKernelFilePath()
Returns the default path to kernel_blob.bin. This file is within the directory returned by GetFixture...
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::unique_ptr< PlatformConfiguration > platform_configuration)
#define CREATE_NATIVE_ENTRY(native_entry)