From c0a6a058eedfa3248e86415bbda499a671fa9f8d Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 20 Feb 2020 14:49:35 -0800 Subject: [PATCH 1/5] Safari font collection tests skip failing methods --- .../test/text/font_collection_test.dart | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/web_ui/test/text/font_collection_test.dart b/lib/web_ui/test/text/font_collection_test.dart index 3b37d87159c9d..ec5590f008a23 100644 --- a/lib/web_ui/test/text/font_collection_test.dart +++ b/lib/web_ui/test/text/font_collection_test.dart @@ -57,7 +57,9 @@ void main() { expect(fontFamilyList.first, 'Ahem ahem ahem'); }, // TODO(nurhan): https://github.com/flutter/flutter/issues/50770 - skip: browserEngine == BrowserEngine.edge); + // TODO(nurhan): https://github.com/flutter/flutter/issues/51142 + skip: browserEngine == BrowserEngine.edge || + browserEngine == BrowserEngine.webkit); test('Register Asset with capital case letters', () async { final String _testFontFamily = "AhEm"; @@ -101,7 +103,9 @@ void main() { } }, // TODO(nurhan): https://github.com/flutter/flutter/issues/50770 - skip: browserEngine == BrowserEngine.edge); + // TODO(nurhan): https://github.com/flutter/flutter/issues/51142 + skip: browserEngine == BrowserEngine.edge || + browserEngine == BrowserEngine.webkit); test('Register Asset twice with exclamation mark', () async { final String _testFontFamily = 'Ahem!!ahem'; @@ -125,7 +129,9 @@ void main() { } }, // TODO(nurhan): https://github.com/flutter/flutter/issues/50770 - skip: browserEngine == BrowserEngine.edge); + // TODO(nurhan): https://github.com/flutter/flutter/issues/51142 + skip: browserEngine == BrowserEngine.edge || + browserEngine == BrowserEngine.webkit); test('Register Asset twice with comma', () async { final String _testFontFamily = 'Ahem ,ahem'; @@ -149,7 +155,9 @@ void main() { } }, // TODO(nurhan): https://github.com/flutter/flutter/issues/50770 - skip: browserEngine == BrowserEngine.edge); + // TODO(nurhan): https://github.com/flutter/flutter/issues/51142 + skip: browserEngine == BrowserEngine.edge || + browserEngine == BrowserEngine.webkit); test('Register Asset twice with a digit at the start of a token', () async { @@ -174,7 +182,9 @@ void main() { } }, // TODO(nurhan): https://github.com/flutter/flutter/issues/50770 - skip: browserEngine == BrowserEngine.edge); + // TODO(nurhan): https://github.com/flutter/flutter/issues/51142 + skip: browserEngine == BrowserEngine.edge || + browserEngine == BrowserEngine.webkit); }); }); } From f83fd4f3af0c99d7b5a893b6b39792f72d7f3322 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 20 Feb 2020 15:28:23 -0800 Subject: [PATCH 2/5] add a clear to the semantics test to make sure no DOM elements are leaking to the other tests --- .../test/engine/semantics/semantics_test.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/web_ui/test/engine/semantics/semantics_test.dart b/lib/web_ui/test/engine/semantics/semantics_test.dart index ab13233168677..fdb0d7eea84ee 100644 --- a/lib/web_ui/test/engine/semantics/semantics_test.dart +++ b/lib/web_ui/test/engine/semantics/semantics_test.dart @@ -25,6 +25,10 @@ void main() { EngineSemanticsOwner.debugResetSemantics(); }); + tearDown(() { + clearSemanticsDomElementIfExists(); + }); + group(EngineSemanticsOwner, () { _testEngineSemanticsOwner(); }); @@ -1352,3 +1356,13 @@ class SemanticsActionLogger { }; } } + +/// In case of an exception semantics DOM element(s) can still stay on the DOM. +void clearSemanticsDomElementIfExists() { + List domElementsToRemove = List(); + if (html.document.getElementsByTagName('flt-semantics').length > 0) { + domElementsToRemove + ..addAll(html.document.getElementsByTagName('flt-semantics')); + } + domElementsToRemove.forEach((html.Node n) => n.remove()); +} From 12895ddd1f555580c6f5b35de4989082083490b6 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 20 Feb 2020 19:30:29 -0800 Subject: [PATCH 3/5] fix semantics_helper_test. skip for semantics_test. teardown didn't work --- .../semantics/semantics_helper_test.dart | 11 ++++--- .../test/engine/semantics/semantics_test.dart | 30 ++++++++----------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/web_ui/test/engine/semantics/semantics_helper_test.dart b/lib/web_ui/test/engine/semantics/semantics_helper_test.dart index 0b676422dd285..cd3e0e9e561d9 100644 --- a/lib/web_ui/test/engine/semantics/semantics_helper_test.dart +++ b/lib/web_ui/test/engine/semantics/semantics_helper_test.dart @@ -59,11 +59,14 @@ void main() { expect(shouldForwardToFramework, true); - event = html.PointerEvent('pointermove'); - shouldForwardToFramework = - desktopSemanticsEnabler.tryEnableSemantics(event); + // Pointer events are not defined in webkit. + if (browserEngine != BrowserEngine.webkit) { + event = html.PointerEvent('pointermove'); + shouldForwardToFramework = + desktopSemanticsEnabler.tryEnableSemantics(event); - expect(shouldForwardToFramework, true); + expect(shouldForwardToFramework, true); + } }, // TODO(nurhan): https://github.com/flutter/flutter/issues/50754 skip: browserEngine == BrowserEngine.edge); diff --git a/lib/web_ui/test/engine/semantics/semantics_test.dart b/lib/web_ui/test/engine/semantics/semantics_test.dart index fdb0d7eea84ee..533d21886d534 100644 --- a/lib/web_ui/test/engine/semantics/semantics_test.dart +++ b/lib/web_ui/test/engine/semantics/semantics_test.dart @@ -25,10 +25,6 @@ void main() { EngineSemanticsOwner.debugResetSemantics(); }); - tearDown(() { - clearSemanticsDomElementIfExists(); - }); - group(EngineSemanticsOwner, () { _testEngineSemanticsOwner(); }); @@ -400,8 +396,10 @@ void _testVerticalScrolling() { semantics().semanticsEnabled = false; }, + // TODO(nurhan): https://github.com/flutter/flutter/issues/50590 // TODO(nurhan): https://github.com/flutter/flutter/issues/50754 - skip: browserEngine == BrowserEngine.edge); + skip: browserEngine == BrowserEngine.webkit || + browserEngine == BrowserEngine.edge); test('scrollable node with children has a container node', () async { semantics() @@ -436,8 +434,10 @@ void _testVerticalScrolling() { semantics().semanticsEnabled = false; }, + // TODO(nurhan): https://github.com/flutter/flutter/issues/50590 // TODO(nurhan): https://github.com/flutter/flutter/issues/50754 - skip: browserEngine == BrowserEngine.edge); + skip: browserEngine == BrowserEngine.webkit || + browserEngine == BrowserEngine.edge); test('scrollable node dispatches scroll events', () async { final StreamController idLogController = StreamController(); @@ -548,8 +548,10 @@ void _testHorizontalScrolling() { semantics().semanticsEnabled = false; }, + // TODO(nurhan): https://github.com/flutter/flutter/issues/50590 // TODO(nurhan): https://github.com/flutter/flutter/issues/50754 - skip: browserEngine == BrowserEngine.edge); + skip: browserEngine == BrowserEngine.webkit || + browserEngine == BrowserEngine.edge); test('scrollable node with children has a container node', () async { semantics() @@ -584,8 +586,10 @@ void _testHorizontalScrolling() { semantics().semanticsEnabled = false; }, + // TODO(nurhan): https://github.com/flutter/flutter/issues/50590 // TODO(nurhan): https://github.com/flutter/flutter/issues/50754 - skip: browserEngine == BrowserEngine.edge); + skip: browserEngine == BrowserEngine.webkit || + browserEngine == BrowserEngine.edge); test('scrollable node dispatches scroll events', () async { final SemanticsActionLogger logger = SemanticsActionLogger(); @@ -1356,13 +1360,3 @@ class SemanticsActionLogger { }; } } - -/// In case of an exception semantics DOM element(s) can still stay on the DOM. -void clearSemanticsDomElementIfExists() { - List domElementsToRemove = List(); - if (html.document.getElementsByTagName('flt-semantics').length > 0) { - domElementsToRemove - ..addAll(html.document.getElementsByTagName('flt-semantics')); - } - domElementsToRemove.forEach((html.Node n) => n.remove()); -} From 351b605397a9625692d63b9e7fbe9910ff88045f Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 20 Feb 2020 20:32:46 -0800 Subject: [PATCH 4/5] skip test, the skipped method run for 8 minutes according to the logs --- lib/web_ui/test/engine/semantics/semantics_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/test/engine/semantics/semantics_test.dart b/lib/web_ui/test/engine/semantics/semantics_test.dart index 533d21886d534..f495acb6006a7 100644 --- a/lib/web_ui/test/engine/semantics/semantics_test.dart +++ b/lib/web_ui/test/engine/semantics/semantics_test.dart @@ -1148,8 +1148,10 @@ void _testTappable() { semantics().semanticsEnabled = false; }, + // TODO(nurhan): https://github.com/flutter/flutter/issues/50590 // TODO(nurhan): https://github.com/flutter/flutter/issues/50754 - skip: browserEngine == BrowserEngine.edge); + skip: browserEngine == BrowserEngine.webkit || + browserEngine == BrowserEngine.edge); } void _testImage() { From f1bbd9973133adc07988257024eda3a2f6c375a2 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 20 Feb 2020 21:11:34 -0800 Subject: [PATCH 5/5] history tests methods runs multiple times. only run them on linux for now. they were also already failing in edge/windows --- lib/web_ui/test/engine/history_test.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/test/engine/history_test.dart b/lib/web_ui/test/engine/history_test.dart index b33247c966088..2704335e13592 100644 --- a/lib/web_ui/test/engine/history_test.dart +++ b/lib/web_ui/test/engine/history_test.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. // @dart = 2.6 +@TestOn('vm && linux') + import 'dart:async'; import 'dart:typed_data'; @@ -158,7 +160,8 @@ void main() { expect(strategy.currentEntryIndex, -1); }, // TODO(nurhan): https://github.com/flutter/flutter/issues/50836 - skip: browserEngine == BrowserEngine.edge); + skip: browserEngine == BrowserEngine.edge || + browserEngine == BrowserEngine.webkit); test('handle user-provided url', () async { strategy =