Unverified Commit 84fe2ade authored by Dan Field's avatar Dan Field Committed by GitHub

Nosuchmethod window (#37417)

parent 18418dff
......@@ -373,4 +373,12 @@ class TestWindow implements Window {
clearTextScaleFactorTestValue();
clearViewInsetsTestValue();
}
/// This gives us some grace time when the dart:ui side adds something to
/// Window, and makes things easier when we do rolls to give us time to
/// catch up.
@override
dynamic noSuchMethod(Invocation invocation) {
return null;
}
}
......@@ -10,6 +10,11 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:meta/meta.dart';
void main() {
test('TestWindow can handle new methods without breaking', () {
final dynamic testWindow = TestWindow(window: ui.window);
expect(testWindow.someNewProperty, null);
});
testWidgets('TestWindow can fake device pixel ratio', (WidgetTester tester) async {
verifyThatTestWindowCanFakeProperty<double>(
tester: tester,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment