-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Discovered in #154380 (comment).
The test in question:
flutter/packages/flutter_tools/test/web.shard/chrome_test.dart
Lines 801 to 819 in a8528c7
| testWithoutContext('chrome.close can recover if getTab throws a StateError', () async { | |
| final BufferLogger logger = BufferLogger.test(); | |
| final FakeChromeConnection chromeConnection = FakeChromeConnection( | |
| maxRetries: 4, | |
| error: StateError('Client is closed.'), | |
| ); | |
| final ChromiumLauncher chromiumLauncher = ChromiumLauncher( | |
| fileSystem: fileSystem, | |
| platform: platform, | |
| processManager: processManager, | |
| operatingSystemUtils: operatingSystemUtils, | |
| browserFinder: findChromeExecutable, | |
| logger: logger, | |
| ); | |
| final FakeProcess process = FakeProcess(); | |
| final Chromium chrome = Chromium(0, chromeConnection, chromiumLauncher: chromiumLauncher, process: process, logger: logger,); | |
| await chrome.close(); | |
| expect(logger.errorText, isEmpty); | |
| }); |
The test is meant to ensure that Chromium.close handles any StateError thrown by the Chromium.connection.getTab call.
However, the StateError provided to the FakeChromeConnection in the test is never thrown, because the argued error is only thrown by calls to getTabs, not getTab.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team