|
5 | 5 | assert(is_win) |
6 | 6 |
|
7 | 7 | import("$flutter_root/shell/platform/glfw/config.gni") |
| 8 | +import("$flutter_root/testing/testing.gni") |
8 | 9 |
|
9 | 10 | _public_headers = [ "public/flutter_windows.h" ] |
10 | 11 |
|
@@ -100,6 +101,34 @@ shared_library("flutter_windows") { |
100 | 101 | public_configs = [ "$flutter_root:config" ] |
101 | 102 | } |
102 | 103 |
|
| 104 | +test_fixtures("flutter_windows_fixtures") { |
| 105 | + fixtures = [] |
| 106 | +} |
| 107 | + |
| 108 | +executable("flutter_windows_unittests") { |
| 109 | + testonly = true |
| 110 | + |
| 111 | + sources = [ |
| 112 | + "win32_window_unittests.cc", |
| 113 | + "testing/win32_flutter_window_test.h", |
| 114 | + "testing/win32_flutter_window_test.cc", |
| 115 | + ] |
| 116 | + |
| 117 | + public_configs = [ "$flutter_root:config" ] |
| 118 | + |
| 119 | + deps = [ |
| 120 | + ":flutter_windows_source", |
| 121 | + ":flutter_windows_headers", |
| 122 | + "//third_party/rapidjson", |
| 123 | + ":flutter_windows_fixtures", |
| 124 | + "$flutter_root/testing", |
| 125 | + # TODO(chunhtai): Consider refactoring flutter_root/testing so that there's a testing |
| 126 | + # target that doesn't require a Dart runtime to be linked in. |
| 127 | + # https://github.com/flutter/flutter/issues/41414. |
| 128 | + "//third_party/dart/runtime:libdart_jit", |
| 129 | + ] |
| 130 | +} |
| 131 | + |
103 | 132 | shared_library("flutter_windows_glfw") { |
104 | 133 | deps = [ |
105 | 134 | "$flutter_root/shell/platform/glfw:flutter_glfw", |
|
0 commit comments