5#include "flutter/runtime/dart_isolate.h"
7#include "flutter/fml/paths.h"
8#include "flutter/runtime/dart_vm.h"
9#include "flutter/runtime/dart_vm_lifecycle.h"
10#include "flutter/testing/dart_isolate_runner.h"
11#include "flutter/testing/fixture_test.h"
12#include "flutter/testing/testing.h"
20const std::string
kKernelFileName =
"no_plugin_registrant_kernel_blob.bin";
21const std::string
kElfFileName =
"no_plugin_registrant_app_elf_snapshot.so";
23class DartIsolateTest :
public FixtureTest {
31 std::vector<std::string> messages;
43 auto settings = CreateSettingsForFixture();
44 auto did_throw_exception =
false;
45 settings.unhandled_exception_callback = [&](
const std::string&
error,
46 const std::string& stack_trace) {
47 did_throw_exception =
true;
70 ASSERT_EQ(messages.size(), 1u);
71 ASSERT_EQ(messages[0],
"main() was called");
72 ASSERT_FALSE(did_throw_exception);
static DartVMRef Create(const Settings &settings, fml::RefPtr< const DartSnapshot > vm_snapshot=nullptr, fml::RefPtr< const DartSnapshot > isolate_snapshot=nullptr)
static bool IsInstanceRunning()
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
struct _Dart_NativeArguments * Dart_NativeArguments
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
const uint8_t uint32_t uint32_t GError ** error
fml::RefPtr< fml::TaskRunner > CreateNewThread(const std::string &name)
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)
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
const std::string kElfFileName
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)
const std::string kKernelFileName
std::string JoinPaths(std::initializer_list< std::string > components)
#define CREATE_NATIVE_ENTRY(native_entry)