5#include "flutter/lib/ui/painting/path.h"
9#include "flutter/common/task_runners.h"
10#include "flutter/fml/synchronization/waitable_event.h"
11#include "flutter/runtime/dart_vm.h"
12#include "flutter/shell/common/shell_test.h"
13#include "flutter/shell/common/thread_host.h"
14#include "flutter/testing/testing.h"
20 auto message_latch = std::make_shared<fml::AutoResetWaitableEvent>();
31 std::shared_ptr<VolatilePathTracker> tracker =
39 EXPECT_FALSE(
path->path().isVolatile());
40 message_latch->Signal();
53 std::unique_ptr<Shell>
shell = CreateShell(
settings, task_runners);
55 ASSERT_TRUE(
shell->IsSetup());
57 configuration.SetEntrypoint(
"createPath");
59 shell->RunEngine(std::move(configuration), [](
auto result) {
63 message_latch->Wait();
65 DestroyShell(std::move(
shell), task_runners);
70 auto message_latch = std::make_shared<fml::AutoResetWaitableEvent>();
81 std::shared_ptr<VolatilePathTracker> tracker =
84 EXPECT_EQ(GetLiveTrackedPathCount(tracker), 1ul);
88 EXPECT_EQ(GetLiveTrackedPathCount(tracker), 1ul);
93 EXPECT_EQ(GetLiveTrackedPathCount(tracker), 0ul);
96 EXPECT_EQ(GetLiveTrackedPathCount(tracker), 0ul);
98 message_latch->Signal();
111 std::unique_ptr<Shell>
shell = CreateShell(
settings, task_runners);
113 ASSERT_TRUE(
shell->IsSetup());
115 configuration.SetEntrypoint(
"createPath");
117 shell->RunEngine(std::move(configuration), [](
auto result) {
121 message_latch->Wait();
123 DestroyShell(std::move(
shell), task_runners);
132 auto message_latch = std::make_shared<fml::AutoResetWaitableEvent>();
142 EXPECT_FALSE(
path->path().isVolatile());
143 std::shared_ptr<VolatilePathTracker> tracker =
146 EXPECT_FALSE(tracker->enabled());
150 EXPECT_FALSE(
path->path().isVolatile());
152 EXPECT_FALSE(
path->path().isVolatile());
153 message_latch->Signal();
157 settings.skia_deterministic_rendering_on_cpu =
true;
167 std::unique_ptr<Shell>
shell = CreateShell(
settings, task_runners);
169 ASSERT_TRUE(
shell->IsSetup());
171 configuration.SetEntrypoint(
"createPath");
173 shell->RunEngine(std::move(configuration), [](
auto result) {
177 message_latch->Wait();
179 DestroyShell(std::move(
shell), task_runners);
static RunConfiguration InferFromSettings(const Settings &settings, const fml::RefPtr< fml::TaskRunner > &io_worker=nullptr, IsolateLaunchType launch_type=IsolateLaunchType::kNewGroup)
Attempts to infer a run configuration from the settings object. This tries to create a run configurat...
std::shared_ptr< VolatilePathTracker > GetVolatilePathTracker() const
static UIDartState * Current()
static constexpr int kFramesOfVolatility
struct _Dart_Handle * Dart_Handle
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, int index, intptr_t *value)
struct _Dart_NativeArguments * Dart_NativeArguments
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
fml::RefPtr< fml::TaskRunner > CreateNewThread(const std::string &name)
fml::RefPtr< fml::TaskRunner > GetCurrentTaskRunner()
TEST_F(DisplayListTest, Defaults)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
#define CREATE_NATIVE_ENTRY(native_entry)
#define EXPECT_TRUE(handle)