5#include "flutter/testing/dart_isolate_runner.h"
6#include "flutter/testing/fixture_test.h"
53 AddNativeCallback(
"GiveObjectToNative",
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();
static sk_sp< Effect > Create()
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()
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
struct _Dart_NativeArguments * Dart_NativeArguments
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::shared_ptr< VolatilePathTracker > volatile_path_tracker, std::unique_ptr< PlatformConfiguration > platform_configuration)
#define CREATE_NATIVE_ENTRY(native_entry)