From bcb3c39d799ff5d8afe17c3b79df8d5df3ce74ca Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Wed, 2 Dec 2020 20:53:01 +0100 Subject: [PATCH] Stop using the List constructor. (flutter/engine#22793) --- engine/src/flutter/lib/web_ui/dev/utils.dart | 6 +++--- .../lib/web_ui/test/text/font_collection_test.dart | 14 +++++++------- .../flutter/lib/web_ui/test/text_editing_test.dart | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engine/src/flutter/lib/web_ui/dev/utils.dart b/engine/src/flutter/lib/web_ui/dev/utils.dart index 662550ad032..2549dd2cd28 100644 --- a/engine/src/flutter/lib/web_ui/dev/utils.dart +++ b/engine/src/flutter/lib/web_ui/dev/utils.dart @@ -220,13 +220,13 @@ bool get isVerboseLoggingEnabled => GeneralTestsArgumentParser.instance.verbose; /// There might be proccesses started during the tests. /// /// Use this list to store those Processes, for cleaning up before shutdown. -final List processesToCleanUp = List(); +final List processesToCleanUp = []; /// There might be temporary directories created during the tests. /// /// Use this list to store those directories and for deleteing them before /// shutdown. -final List temporaryDirectories = List(); +final List temporaryDirectories = []; typedef AsyncCallback = Future Function(); @@ -234,7 +234,7 @@ typedef AsyncCallback = Future Function(); /// /// Add these operations here to make sure that they will run before felt /// exit. -final List cleanupCallbacks = List(); +final List cleanupCallbacks = []; /// Cleanup the remaning processes, close open browsers, delete temp files. void cleanup() async { diff --git a/engine/src/flutter/lib/web_ui/test/text/font_collection_test.dart b/engine/src/flutter/lib/web_ui/test/text/font_collection_test.dart index b6423378ef6..f5b06b66972 100644 --- a/engine/src/flutter/lib/web_ui/test/text/font_collection_test.dart +++ b/engine/src/flutter/lib/web_ui/test/text/font_collection_test.dart @@ -30,7 +30,7 @@ void testMain() { group('regular special characters', () { test('Register Asset with no special characters', () async { final String _testFontFamily = "Ahem"; - final List fontFamilyList = List(); + final List fontFamilyList = []; fontManager.registerAsset( _testFontFamily, 'url($_testFontUrl)', const {}); @@ -48,7 +48,7 @@ void testMain() { test('Register Asset with white space in the family name', () async { final String _testFontFamily = "Ahem ahem ahem"; - final List fontFamilyList = List(); + final List fontFamilyList = []; fontManager.registerAsset( _testFontFamily, 'url($_testFontUrl)', const {}); @@ -68,7 +68,7 @@ void testMain() { test('Register Asset with capital case letters', () async { final String _testFontFamily = "AhEm"; - final List fontFamilyList = List(); + final List fontFamilyList = []; fontManager.registerAsset( _testFontFamily, 'url($_testFontUrl)', const {}); @@ -88,7 +88,7 @@ void testMain() { group('fonts with special characters', () { test('Register Asset twice with special character slash', () async { final String _testFontFamily = '/Ahem'; - final List fontFamilyList = List(); + final List fontFamilyList = []; fontManager.registerAsset( _testFontFamily, 'url($_testFontUrl)', const {}); @@ -114,7 +114,7 @@ void testMain() { test('Register Asset twice with exclamation mark', () async { final String _testFontFamily = 'Ahem!!ahem'; - final List fontFamilyList = List(); + final List fontFamilyList = []; fontManager.registerAsset( _testFontFamily, 'url($_testFontUrl)', const {}); @@ -140,7 +140,7 @@ void testMain() { test('Register Asset twice with comma', () async { final String _testFontFamily = 'Ahem ,ahem'; - final List fontFamilyList = List(); + final List fontFamilyList = []; fontManager.registerAsset( _testFontFamily, 'url($_testFontUrl)', const {}); @@ -167,7 +167,7 @@ void testMain() { test('Register Asset twice with a digit at the start of a token', () async { final String testFontFamily = 'Ahem 1998'; - final List fontFamilyList = List(); + final List fontFamilyList = []; fontManager.registerAsset( testFontFamily, 'url($_testFontUrl)', const {}); diff --git a/engine/src/flutter/lib/web_ui/test/text_editing_test.dart b/engine/src/flutter/lib/web_ui/test/text_editing_test.dart index 6bd51debeba..721cb7cff42 100644 --- a/engine/src/flutter/lib/web_ui/test/text_editing_test.dart +++ b/engine/src/flutter/lib/web_ui/test/text_editing_test.dart @@ -2163,7 +2163,7 @@ void checkInputEditingState( /// In case of an exception backup DOM element(s) can still stay on the DOM. void clearBackUpDomElementIfExists() { - List domElementsToRemove = List(); + List domElementsToRemove = []; if (document.getElementsByTagName('input').length > 0) { domElementsToRemove..addAll(document.getElementsByTagName('input')); }