8#include "flutter/shell/platform/glfw/client_wrapper/include/flutter/plugin_registrar_glfw.h"
9#include "flutter/shell/platform/glfw/client_wrapper/testing/stub_flutter_glfw_api.h"
10#include "gtest/gtest.h"
18class TestPlugin :
public Plugin {
22 TestPlugin(PluginRegistrarGlfw* registrar,
23 bool* registrar_valid_at_destruction)
24 : registrar_(registrar),
25 registrar_valid_at_destruction_(registrar_valid_at_destruction) {}
26 virtual ~TestPlugin() {
27 *registrar_valid_at_destruction_ = registrar_->window() !=
nullptr;
31 PluginRegistrarGlfw* registrar_;
32 bool* registrar_valid_at_destruction_;
37TEST(PluginRegistrarGlfwTest, GetView) {
39 std::make_unique<testing::StubFlutterGlfwApi>());
42 EXPECT_NE(registrar.
window(),
nullptr);
46TEST(PluginRegistrarGlfwTest, PluginDestroyedBeforeRegistrar) {
47 auto dummy_registrar_handle =
49 bool registrar_valid_at_destruction =
false;
53 auto plugin = std::make_unique<TestPlugin>(®istrar,
54 ®istrar_valid_at_destruction);
void AddPlugin(std::unique_ptr< Plugin > plugin)
TEST(FrameTimingsRecorderTest, RecordVsync)
#define EXPECT_TRUE(handle)