From e3127979f72b25791cd0f108ad42f94281366fec Mon Sep 17 00:00:00 2001 From: nbayati <99771966+nbayati@users.noreply.github.com> Date: Tue, 17 May 2022 08:29:43 -0700 Subject: [PATCH] Added workaround for ios safari iframe issue (#32415) --- .../lib/src/engine/browser_detection.dart | 11 +++++ .../lib/src/engine/pointer_binding.dart | 35 +++++++++++---- lib/web_ui/test/canvaskit/common.dart | 2 - .../test/canvaskit/frame_timings_test.dart | 1 + .../test/canvaskit/hot_restart_test.dart | 2 - .../initialization_services_vs_ui_test.dart | 2 - lib/web_ui/test/canvaskit/scene_test.dart | 2 - lib/web_ui/test/canvaskit/semantics_test.dart | 1 + .../canvaskit/skia_font_collection_test.dart | 2 - lib/web_ui/test/canvaskit/text_test.dart | 1 + lib/web_ui/test/common.dart | 15 ------- .../test/engine/pointer_binding_test.dart | 43 ++++++++++++++----- .../test/engine/semantics/semantics_test.dart | 1 - .../test/html/bitmap_canvas_golden_test.dart | 1 - .../test/html/canvas_context_golden_test.dart | 3 +- .../test/html/canvas_reuse_golden_test.dart | 2 - .../canvas_draw_image_golden_test.dart | 1 - .../drawing/canvas_rrect_golden_test.dart | 2 - .../drawing/draw_vertices_golden_test.dart | 2 - lib/web_ui/test/html/paragraph/helper.dart | 2 - .../test/html/paragraph/text_scuba.dart | 2 - .../test/html/path_metrics_golden_test.dart | 1 - .../test/html/path_to_svg_golden_test.dart | 2 - .../test/html/path_transform_golden_test.dart | 2 - .../html/recording_canvas_golden_test.dart | 1 - lib/web_ui/test/html/screenshot.dart | 2 - .../html/shaders/gradient_golden_test.dart | 1 - .../shaders/image_shader_golden_test.dart | 1 - .../shaders/linear_gradient_golden_test.dart | 1 - .../shaders/radial_gradient_golden_test.dart | 1 - .../html/shaders/shader_mask_golden_test.dart | 2 - 31 files changed, 73 insertions(+), 74 deletions(-) delete mode 100644 lib/web_ui/test/common.dart diff --git a/lib/web_ui/lib/src/engine/browser_detection.dart b/lib/web_ui/lib/src/engine/browser_detection.dart index 45baa050e61ad..59dc018b309aa 100644 --- a/lib/web_ui/lib/src/engine/browser_detection.dart +++ b/lib/web_ui/lib/src/engine/browser_detection.dart @@ -236,6 +236,17 @@ bool get isIOS15 { domWindow.navigator.userAgent.contains('OS 15_'); } +/// Returns true if the browser is iOS Safari, false otherwise. +bool get isIosSafari => + browserEngine == BrowserEngine.webkit && + operatingSystem == OperatingSystem.iOs; + +/// Whether the current browser is Safari. +bool get isSafari => browserEngine == BrowserEngine.webkit; + +/// Whether the current browser is Firefox. +bool get isFirefox => browserEngine == BrowserEngine.firefox; + /// Use in tests to simulate the detection of iOS 15. bool? debugIsIOS15; diff --git a/lib/web_ui/lib/src/engine/pointer_binding.dart b/lib/web_ui/lib/src/engine/pointer_binding.dart index d81100f3913a2..5ad994b4272b6 100644 --- a/lib/web_ui/lib/src/engine/pointer_binding.dart +++ b/lib/web_ui/lib/src/engine/pointer_binding.dart @@ -62,6 +62,16 @@ int convertButtonToButtons(int button) { } } +/// Wrapping the Safari iOS workaround that adds a dummy event listener +/// More info about the issue and workaround: https://github.com/flutter/flutter/issues/70858 +class SafariPointerEventWorkaround { + static SafariPointerEventWorkaround instance = SafariPointerEventWorkaround(); + + void workAroundMissingPointerEvents() { + html.document.addEventListener('touchstart', (html.Event event) {}); + } +} + class PointerBinding { /// The singleton instance of this object. static PointerBinding? get instance => _instance; @@ -69,20 +79,27 @@ class PointerBinding { static void initInstance(html.Element glassPaneElement) { if (_instance == null) { - _instance = PointerBinding._(glassPaneElement); + _instance = PointerBinding(glassPaneElement); assert(() { - registerHotRestartListener(() { - _instance!._adapter.clearListeners(); - _instance!._pointerDataConverter.clearPointerState(); - }); + registerHotRestartListener(_instance!.dispose); return true; }()); } } - PointerBinding._(this.glassPaneElement) + /// Performs necessary clean up for PointerBinding including removing event listeners + /// and clearing the existing pointer state + void dispose() { + _adapter.clearListeners(); + _pointerDataConverter.clearPointerState(); + } + + PointerBinding(this.glassPaneElement) : _pointerDataConverter = PointerDataConverter(), _detector = const PointerSupportDetector() { + if (isIosSafari) { + SafariPointerEventWorkaround.instance.workAroundMissingPointerEvents(); + } _adapter = _createAdapter(); } @@ -158,10 +175,10 @@ abstract class _BaseAdapter { } /// Listeners that are registered through dart to js api. - static final Map _listeners = + final Map _listeners = {}; /// Listeners that are registered through native javascript api. - static final Map _nativeListeners = + final Map _nativeListeners = {}; final html.Element glassPaneElement; _PointerDataCallback _callback; @@ -290,7 +307,7 @@ mixin _WheelEventListenerMixin on _BaseAdapter { 'passive': false, }); final html.EventListener jsHandler = allowInterop((html.Event event) => handler(event)); - _BaseAdapter._nativeListeners['wheel'] = jsHandler; + _nativeListeners['wheel'] = jsHandler; addJsEventListener(glassPaneElement, 'wheel', jsHandler, eventOptions); } diff --git a/lib/web_ui/test/canvaskit/common.dart b/lib/web_ui/test/canvaskit/common.dart index b512125ca1a2d..9b3275f4da4dc 100644 --- a/lib/web_ui/test/canvaskit/common.dart +++ b/lib/web_ui/test/canvaskit/common.dart @@ -10,8 +10,6 @@ import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' as ui; import 'package:web_engine_tester/golden_tester.dart'; -export '../common.dart'; - /// Used in tests instead of [ProductionCollector] to control Skia object /// collection explicitly, and to prevent leaks across tests. /// diff --git a/lib/web_ui/test/canvaskit/frame_timings_test.dart b/lib/web_ui/test/canvaskit/frame_timings_test.dart index f6910f4c74dd9..ca0ee4df79917 100644 --- a/lib/web_ui/test/canvaskit/frame_timings_test.dart +++ b/lib/web_ui/test/canvaskit/frame_timings_test.dart @@ -4,6 +4,7 @@ import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; +import 'package:ui/src/engine/browser_detection.dart'; import '../frame_timings_common.dart'; import 'common.dart'; diff --git a/lib/web_ui/test/canvaskit/hot_restart_test.dart b/lib/web_ui/test/canvaskit/hot_restart_test.dart index 6b6f304e6dcf2..c99bc57e6963a 100644 --- a/lib/web_ui/test/canvaskit/hot_restart_test.dart +++ b/lib/web_ui/test/canvaskit/hot_restart_test.dart @@ -6,8 +6,6 @@ import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; -import 'common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/canvaskit/initialization_services_vs_ui_test.dart b/lib/web_ui/test/canvaskit/initialization_services_vs_ui_test.dart index 053af393e6d4e..1268aa12a6b9a 100644 --- a/lib/web_ui/test/canvaskit/initialization_services_vs_ui_test.dart +++ b/lib/web_ui/test/canvaskit/initialization_services_vs_ui_test.dart @@ -6,8 +6,6 @@ import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; -import 'common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/canvaskit/scene_test.dart b/lib/web_ui/test/canvaskit/scene_test.dart index 70af8e7f74e0d..6bbbacf449428 100644 --- a/lib/web_ui/test/canvaskit/scene_test.dart +++ b/lib/web_ui/test/canvaskit/scene_test.dart @@ -8,8 +8,6 @@ import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' as ui; -import 'common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/canvaskit/semantics_test.dart b/lib/web_ui/test/canvaskit/semantics_test.dart index 36969fb886f5c..7053c3d7958b2 100644 --- a/lib/web_ui/test/canvaskit/semantics_test.dart +++ b/lib/web_ui/test/canvaskit/semantics_test.dart @@ -8,6 +8,7 @@ import 'dart:async'; import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; +import 'package:ui/src/engine/browser_detection.dart'; import '../engine/semantics/semantics_test.dart'; import 'common.dart'; diff --git a/lib/web_ui/test/canvaskit/skia_font_collection_test.dart b/lib/web_ui/test/canvaskit/skia_font_collection_test.dart index b3fd6fabe00fd..76a0f56b24f27 100644 --- a/lib/web_ui/test/canvaskit/skia_font_collection_test.dart +++ b/lib/web_ui/test/canvaskit/skia_font_collection_test.dart @@ -9,8 +9,6 @@ import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; -import 'common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/canvaskit/text_test.dart b/lib/web_ui/test/canvaskit/text_test.dart index fabf17ed222b2..b4705f76089be 100644 --- a/lib/web_ui/test/canvaskit/text_test.dart +++ b/lib/web_ui/test/canvaskit/text_test.dart @@ -4,6 +4,7 @@ import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; +import 'package:ui/src/engine/browser_detection.dart'; import 'package:ui/ui.dart' as ui; import 'common.dart'; diff --git a/lib/web_ui/test/common.dart b/lib/web_ui/test/common.dart deleted file mode 100644 index 2909a6fecaca8..0000000000000 --- a/lib/web_ui/test/common.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:ui/src/engine.dart'; - -/// Whether the current browser is Safari. -bool get isSafari => browserEngine == BrowserEngine.webkit; - -/// Whether the current browser is Safari on iOS. -// TODO(yjbanov): https://github.com/flutter/flutter/issues/60040 -bool get isIosSafari => isSafari && operatingSystem == OperatingSystem.iOs; - -/// Whether the current browser is Firefox. -bool get isFirefox => browserEngine == BrowserEngine.firefox; diff --git a/lib/web_ui/test/engine/pointer_binding_test.dart b/lib/web_ui/test/engine/pointer_binding_test.dart index e3ee00792348c..db6ee840a7686 100644 --- a/lib/web_ui/test/engine/pointer_binding_test.dart +++ b/lib/web_ui/test/engine/pointer_binding_test.dart @@ -38,8 +38,6 @@ void _testEach( /// Some methods in this class are skipped for iOS-Safari. // TODO(mdebbar): https://github.com/flutter/flutter/issues/60033 -bool get isIosSafari => browserEngine == BrowserEngine.webkit && - operatingSystem == OperatingSystem.iOs; void main() { internalBootstrapBrowserTest(() => testMain); @@ -55,6 +53,15 @@ void testMain() { dpi = window.devicePixelRatio; }); + test('ios workaround', () { + final MockSafariPointerEventWorkaround mockSafariPointer = + MockSafariPointerEventWorkaround(); + SafariPointerEventWorkaround.instance = mockSafariPointer; + final PointerBinding instance = PointerBinding(html.DivElement()); + expect(mockSafariPointer.workAroundInvoked, isIosSafari); + instance.dispose(); + }, skip: !isIosSafari); + test('_PointerEventContext generates expected events', () { if (!_PointerEventContext().isSupported) { return; @@ -1226,7 +1233,7 @@ void testMain() { _PointerEventContext(), ], 'correctly handles missing right mouse button up when followed by move', - (_ButtonedEventMixin context) { + (_ButtonedEventMixin context) { PointerBinding.instance!.debugOverrideDetector(context); // This can happen with the following gesture sequence: // @@ -1787,8 +1794,7 @@ void testMain() { expect(packets, hasLength(1)); expect(packets[0].data, hasLength(1)); expect(packets[0].data[0].change, equals(ui.PointerChange.move)); - expect(packets[0].data[0].physicalX, - equals(900.0 * dpi)); + expect(packets[0].data[0].physicalX, equals(900.0 * dpi)); expect(packets[0].data[0].physicalY, equals(1900.0 * dpi)); packets.clear(); @@ -2241,6 +2247,15 @@ void testMain() { ); } +class MockSafariPointerEventWorkaround implements SafariPointerEventWorkaround { + bool workAroundInvoked = false; + + @override + void workAroundMissingPointerEvents() { + workAroundInvoked = true; + } +} + abstract class _BasicEventContext implements PointerSupportDetector { String get name; @@ -2275,10 +2290,14 @@ mixin _ButtonedEventMixin on _BasicEventContext { // // If there is no button change, assign `button` with _kNoButtonChange. html.Event mouseMove( - {double? clientX, double? clientY, required int button, required int buttons}); + {double? clientX, + double? clientY, + required int button, + required int buttons}); // Generate an event that releases all mouse buttons. - html.Event mouseUp({double? clientX, double? clientY, int? button, int? buttons}); + html.Event mouseUp( + {double? clientX, double? clientY, int? button, int? buttons}); html.Event hover({double? clientX, double? clientY}) { return mouseMove( @@ -2325,7 +2344,8 @@ mixin _ButtonedEventMixin on _BasicEventContext { required double? deltaX, required double? deltaY, }) { - final Function jsWheelEvent = js_util.getProperty(html.window, 'WheelEvent'); + final Function jsWheelEvent = + js_util.getProperty(html.window, 'WheelEvent'); final List eventArgs = [ 'wheel', { @@ -2396,8 +2416,7 @@ mixin _MultiPointerEventMixin on _BasicEventContext { class _TouchEventContext extends _BasicEventContext with _MultiPointerEventMixin implements PointerSupportDetector { - _TouchEventContext() : - _target = html.document.createElement('div'); + _TouchEventContext() : _target = html.document.createElement('div'); @override String get name => 'TouchAdapter'; @@ -2518,7 +2537,9 @@ class _MouseEventContext extends _BasicEventContext hasButtonChange && (buttons & convertButtonToButtons(button)) != 0; final String adjustedType = !hasButtonChange ? 'mousemove' - : changeIsButtonDown ? 'mousedown' : 'mouseup'; + : changeIsButtonDown + ? 'mousedown' + : 'mouseup'; final int adjustedButton = hasButtonChange ? button : 0; return _createMouseEvent( adjustedType, diff --git a/lib/web_ui/test/engine/semantics/semantics_test.dart b/lib/web_ui/test/engine/semantics/semantics_test.dart index c848f48d53be5..d6d356967bae7 100644 --- a/lib/web_ui/test/engine/semantics/semantics_test.dart +++ b/lib/web_ui/test/engine/semantics/semantics_test.dart @@ -15,7 +15,6 @@ import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' as ui; -import '../../common.dart'; import 'semantics_tester.dart'; DateTime _testTime = DateTime(2018, 12, 17); diff --git a/lib/web_ui/test/html/bitmap_canvas_golden_test.dart b/lib/web_ui/test/html/bitmap_canvas_golden_test.dart index c6da523ff411e..e974e9dd9080c 100644 --- a/lib/web_ui/test/html/bitmap_canvas_golden_test.dart +++ b/lib/web_ui/test/html/bitmap_canvas_golden_test.dart @@ -11,7 +11,6 @@ import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart'; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; import 'screenshot.dart'; void main() { diff --git a/lib/web_ui/test/html/canvas_context_golden_test.dart b/lib/web_ui/test/html/canvas_context_golden_test.dart index 1f4cf8eaf6eb1..c458e029ae5fd 100644 --- a/lib/web_ui/test/html/canvas_context_golden_test.dart +++ b/lib/web_ui/test/html/canvas_context_golden_test.dart @@ -7,12 +7,11 @@ import 'dart:html' as html; import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; import 'package:ui/src/engine.dart' as engine; +import 'package:ui/src/engine/browser_detection.dart'; import 'package:ui/ui.dart' hide TextStyle; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/html/canvas_reuse_golden_test.dart b/lib/web_ui/test/html/canvas_reuse_golden_test.dart index 4163188a4a16c..fc14a7e0e14c7 100644 --- a/lib/web_ui/test/html/canvas_reuse_golden_test.dart +++ b/lib/web_ui/test/html/canvas_reuse_golden_test.dart @@ -11,8 +11,6 @@ import 'package:ui/ui.dart' hide TextStyle; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/html/drawing/canvas_draw_image_golden_test.dart b/lib/web_ui/test/html/drawing/canvas_draw_image_golden_test.dart index d5f0e4e159841..f55f4b6190ff8 100644 --- a/lib/web_ui/test/html/drawing/canvas_draw_image_golden_test.dart +++ b/lib/web_ui/test/html/drawing/canvas_draw_image_golden_test.dart @@ -13,7 +13,6 @@ import 'package:ui/ui.dart'; import 'package:web_engine_tester/golden_tester.dart'; -import '../../common.dart'; import '../screenshot.dart'; void main() { diff --git a/lib/web_ui/test/html/drawing/canvas_rrect_golden_test.dart b/lib/web_ui/test/html/drawing/canvas_rrect_golden_test.dart index 4bd90276d92ea..169af97c42152 100644 --- a/lib/web_ui/test/html/drawing/canvas_rrect_golden_test.dart +++ b/lib/web_ui/test/html/drawing/canvas_rrect_golden_test.dart @@ -11,8 +11,6 @@ import 'package:ui/ui.dart'; import 'package:web_engine_tester/golden_tester.dart'; -import '../../common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/html/drawing/draw_vertices_golden_test.dart b/lib/web_ui/test/html/drawing/draw_vertices_golden_test.dart index 52a0fbe271371..368a9d96cb7e7 100644 --- a/lib/web_ui/test/html/drawing/draw_vertices_golden_test.dart +++ b/lib/web_ui/test/html/drawing/draw_vertices_golden_test.dart @@ -14,8 +14,6 @@ import 'package:ui/ui.dart' hide TextStyle, ImageShader; import 'package:web_engine_tester/golden_tester.dart'; -import '../../common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/html/paragraph/helper.dart b/lib/web_ui/test/html/paragraph/helper.dart index 39ed51846f8c7..5ad933370a2e4 100644 --- a/lib/web_ui/test/html/paragraph/helper.dart +++ b/lib/web_ui/test/html/paragraph/helper.dart @@ -8,8 +8,6 @@ import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart'; import 'package:web_engine_tester/golden_tester.dart'; -import '../../common.dart'; - const Color white = Color(0xFFFFFFFF); const Color black = Color(0xFF000000); const Color red = Color(0xFFFF0000); diff --git a/lib/web_ui/test/html/paragraph/text_scuba.dart b/lib/web_ui/test/html/paragraph/text_scuba.dart index 3ad794a78746f..1753f6274a67c 100644 --- a/lib/web_ui/test/html/paragraph/text_scuba.dart +++ b/lib/web_ui/test/html/paragraph/text_scuba.dart @@ -11,8 +11,6 @@ import 'package:ui/ui.dart' as ui; import 'package:web_engine_tester/golden_tester.dart'; -import '../../common.dart'; - /// Class that controls some details of how screenshotting is made. /// /// (For Googlers: Not really related with internal Scuba anymore) diff --git a/lib/web_ui/test/html/path_metrics_golden_test.dart b/lib/web_ui/test/html/path_metrics_golden_test.dart index d735ec97257b9..a95b0a9f2e067 100644 --- a/lib/web_ui/test/html/path_metrics_golden_test.dart +++ b/lib/web_ui/test/html/path_metrics_golden_test.dart @@ -10,7 +10,6 @@ import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' hide TextStyle; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; import '../matchers.dart'; void main() { diff --git a/lib/web_ui/test/html/path_to_svg_golden_test.dart b/lib/web_ui/test/html/path_to_svg_golden_test.dart index bb5036c4fb10f..5bb6d96049aed 100644 --- a/lib/web_ui/test/html/path_to_svg_golden_test.dart +++ b/lib/web_ui/test/html/path_to_svg_golden_test.dart @@ -12,8 +12,6 @@ import 'package:ui/ui.dart'; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/html/path_transform_golden_test.dart b/lib/web_ui/test/html/path_transform_golden_test.dart index f4c4c84588a8e..3d9e357770205 100644 --- a/lib/web_ui/test/html/path_transform_golden_test.dart +++ b/lib/web_ui/test/html/path_transform_golden_test.dart @@ -12,8 +12,6 @@ import 'package:ui/ui.dart' hide TextStyle; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; - void main() { internalBootstrapBrowserTest(() => testMain); } diff --git a/lib/web_ui/test/html/recording_canvas_golden_test.dart b/lib/web_ui/test/html/recording_canvas_golden_test.dart index 0aa72ad4e337e..c775ef81ba2c5 100644 --- a/lib/web_ui/test/html/recording_canvas_golden_test.dart +++ b/lib/web_ui/test/html/recording_canvas_golden_test.dart @@ -12,7 +12,6 @@ import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' hide TextStyle; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; import '../matchers.dart'; import 'paragraph/text_scuba.dart'; diff --git a/lib/web_ui/test/html/screenshot.dart b/lib/web_ui/test/html/screenshot.dart index b36866dab1876..3eb571d73fbd2 100644 --- a/lib/web_ui/test/html/screenshot.dart +++ b/lib/web_ui/test/html/screenshot.dart @@ -9,8 +9,6 @@ import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' as ui; import 'package:web_engine_tester/golden_tester.dart'; -import '../common.dart'; - /// Commit a recording canvas to a bitmap, and compare with the expected. Future canvasScreenshot(RecordingCanvas rc, String fileName, {ui.Rect region = const ui.Rect.fromLTWH(0, 0, 600, 800), diff --git a/lib/web_ui/test/html/shaders/gradient_golden_test.dart b/lib/web_ui/test/html/shaders/gradient_golden_test.dart index 1cbcdfe81b69e..81dd749ebf590 100644 --- a/lib/web_ui/test/html/shaders/gradient_golden_test.dart +++ b/lib/web_ui/test/html/shaders/gradient_golden_test.dart @@ -14,7 +14,6 @@ import 'package:ui/ui.dart'; import 'package:web_engine_tester/golden_tester.dart'; -import '../../common.dart'; import '../paragraph/text_scuba.dart'; // TODO(yjbanov): unskip Firefox tests when Firefox implements WebGL in headless mode. diff --git a/lib/web_ui/test/html/shaders/image_shader_golden_test.dart b/lib/web_ui/test/html/shaders/image_shader_golden_test.dart index 7b9b95b306fc5..6f7aa53bbb80a 100644 --- a/lib/web_ui/test/html/shaders/image_shader_golden_test.dart +++ b/lib/web_ui/test/html/shaders/image_shader_golden_test.dart @@ -10,7 +10,6 @@ import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' hide TextStyle; -import '../../common.dart'; import '../screenshot.dart'; // TODO(yjbanov): unskip Firefox tests when Firefox implements WebGL in headless mode. diff --git a/lib/web_ui/test/html/shaders/linear_gradient_golden_test.dart b/lib/web_ui/test/html/shaders/linear_gradient_golden_test.dart index 500a6c1c85da1..d9ab10bc06180 100644 --- a/lib/web_ui/test/html/shaders/linear_gradient_golden_test.dart +++ b/lib/web_ui/test/html/shaders/linear_gradient_golden_test.dart @@ -8,7 +8,6 @@ import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' hide TextStyle; -import '../../common.dart'; import '../screenshot.dart'; // TODO(yjbanov): unskip Firefox tests when Firefox implements WebGL in headless mode. diff --git a/lib/web_ui/test/html/shaders/radial_gradient_golden_test.dart b/lib/web_ui/test/html/shaders/radial_gradient_golden_test.dart index 47ca9a6993e94..d5ac111cf6cec 100644 --- a/lib/web_ui/test/html/shaders/radial_gradient_golden_test.dart +++ b/lib/web_ui/test/html/shaders/radial_gradient_golden_test.dart @@ -6,7 +6,6 @@ import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' hide TextStyle; -import '../../common.dart'; import '../screenshot.dart'; void main() { diff --git a/lib/web_ui/test/html/shaders/shader_mask_golden_test.dart b/lib/web_ui/test/html/shaders/shader_mask_golden_test.dart index 00732aebdfe24..1eac9c1d72b19 100644 --- a/lib/web_ui/test/html/shaders/shader_mask_golden_test.dart +++ b/lib/web_ui/test/html/shaders/shader_mask_golden_test.dart @@ -12,8 +12,6 @@ import 'package:ui/ui.dart'; import 'package:web_engine_tester/golden_tester.dart'; -import '../../common.dart'; - /// To debug compositing failures on browsers, set this flag to true and run /// flutter run -d chrome --web-renderer=html /// test/golden_tests/engine/shader_mask_golden_test.dart --profile