Skip to content

Commit f095a77

Browse files
authored
Disable focused_text_field golden on Firefox (flutter#23442)
1 parent 82a7556 commit f095a77

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'dart:html';
6+
7+
/// Whether the current browser is Firefox.
8+
bool get isFirefox => window.navigator.userAgent.toLowerCase().contains('firefox');

e2etests/web/regular_integration_tests/test_driver/text_editing_integration.dart

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import 'dart:js_util' as js_util;
77
import 'package:flutter/gestures.dart';
88
import 'package:flutter/services.dart';
99
import 'package:flutter_test/flutter_test.dart';
10-
import 'package:regular_integration_tests/text_editing_main.dart' as app;
1110
import 'package:flutter/material.dart';
12-
1311
import 'package:integration_test/integration_test.dart';
1412

13+
import 'package:regular_integration_tests/text_editing_main.dart' as app;
14+
import 'package:regular_integration_tests/common.dart';
15+
1516
void main() {
1617
final IntegrationTestWidgetsFlutterBinding binding =
1718
IntegrationTestWidgetsFlutterBinding.ensureInitialized()
@@ -44,7 +45,13 @@ void main() {
4445
// DOM element's value also changes.
4546
expect(input.value, 'New Value');
4647

47-
await binding.takeScreenshot('focused_text_field');
48+
// Firefox can't make up its mind about what the screenshot should
49+
// look like between LUCI and local.
50+
//
51+
// https://github.com/flutter/flutter/issues/73382
52+
if (!isFirefox) {
53+
await binding.takeScreenshot('focused_text_field');
54+
}
4855
});
4956

5057
testWidgets('Input field with no initial value works',

0 commit comments

Comments
 (0)