5#include "flutter/shell/platform/glfw/client_wrapper/include/flutter/flutter_window.h"
10#include "flutter/shell/platform/glfw/client_wrapper/testing/stub_flutter_glfw_api.h"
11#include "gtest/gtest.h"
18class TestGlfwApi :
public testing::StubFlutterGlfwApi {
23 set_size_limits_called_ =
true;
26 bool set_size_limits_called() {
return set_size_limits_called_; }
29 bool set_size_limits_called_ =
false;
34TEST(FlutterWindowTest, SetSizeLimits) {
35 const std::string icu_data_path =
"fake/path/to/icu";
37 std::make_unique<TestGlfwApi>());
38 auto test_api =
static_cast<TestGlfwApi*
>(scoped_api_stub.
stub());
42 auto window = std::make_unique<FlutterWindow>(raw_window);
45 minimum_size.
width = 100;
49 maximum_size.
width = -1;
52 window->SetSizeLimits(minimum_size, maximum_size);
54 EXPECT_EQ(test_api->set_size_limits_called(),
true);
StubFlutterGlfwApi * stub()
TEST(FrameTimingsRecorderTest, RecordVsync)