mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Remove no-shuffle from framework tests, part 1: easy cases (#123751)
Remove no-shuffle from framework tests, part 1: easy cases
This commit is contained in:
parent
5f71179480
commit
a28aae918e
@ -2,13 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
|
|
||||||
// dependencies have been fixed.
|
|
||||||
// https://github.com/flutter/flutter/issues/85160
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=123"
|
|
||||||
@Tags(<String>['no-shuffle'])
|
|
||||||
library;
|
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
|
@ -2,15 +2,10 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// no-shuffle:
|
|
||||||
// //TODO(gspencergoog): Remove this tag once this test's state leaks/test
|
|
||||||
// dependencies have been fixed.
|
|
||||||
// https://github.com/flutter/flutter/issues/85160
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=456"
|
|
||||||
// reduced-test-set:
|
// reduced-test-set:
|
||||||
// This file is run as part of a reduced test set in CI on Mac and Windows
|
// This file is run as part of a reduced test set in CI on Mac and Windows
|
||||||
// machines.
|
// machines.
|
||||||
@Tags(<String>['reduced-test-set', 'no-shuffle'])
|
@Tags(<String>['reduced-test-set'])
|
||||||
library;
|
library;
|
||||||
|
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
|
|
||||||
// dependencies have been fixed.
|
|
||||||
// https://github.com/flutter/flutter/issues/85160
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=456"
|
|
||||||
@Tags(<String>['no-shuffle'])
|
|
||||||
@TestOn('!chrome')
|
@TestOn('!chrome')
|
||||||
library;
|
library;
|
||||||
|
|
||||||
|
@ -2,13 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
|
|
||||||
// dependencies have been fixed.
|
|
||||||
// https://github.com/flutter/flutter/issues/85160
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=123"
|
|
||||||
@Tags(<String>['no-shuffle'])
|
|
||||||
library;
|
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
@ -870,6 +863,7 @@ void main() {
|
|||||||
result = await pendingResult;
|
result = await pendingResult;
|
||||||
expect(result, <String, String>{});
|
expect(result, <String, String>{});
|
||||||
expect(binding.reassembled, 1);
|
expect(binding.reassembled, 1);
|
||||||
|
binding.reassembled = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Service extensions - showPerformanceOverlay', () async {
|
test('Service extensions - showPerformanceOverlay', () async {
|
||||||
|
@ -2,13 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
|
|
||||||
// dependencies have been fixed.
|
|
||||||
// https://github.com/flutter/flutter/issues/85160
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=123"
|
|
||||||
@Tags(<String>['no-shuffle'])
|
|
||||||
library;
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/physics.dart';
|
import 'package:flutter/physics.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
@ -2,13 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
|
|
||||||
// dependencies have been fixed.
|
|
||||||
// https://github.com/flutter/flutter/issues/85160
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=20210826"
|
|
||||||
@Tags(<String>['no-shuffle'])
|
|
||||||
library;
|
|
||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
@ -44,8 +37,14 @@ void main() {
|
|||||||
group('MethodChannel', () {
|
group('MethodChannel', () {
|
||||||
const MessageCodec<dynamic> jsonMessage = JSONMessageCodec();
|
const MessageCodec<dynamic> jsonMessage = JSONMessageCodec();
|
||||||
const MethodCodec jsonMethod = JSONMethodCodec();
|
const MethodCodec jsonMethod = JSONMethodCodec();
|
||||||
|
|
||||||
const MethodChannel channel = MethodChannel('ch7', jsonMethod);
|
const MethodChannel channel = MethodChannel('ch7', jsonMethod);
|
||||||
const OptionalMethodChannel optionalMethodChannel = OptionalMethodChannel('ch8', jsonMethod);
|
const OptionalMethodChannel optionalMethodChannel = OptionalMethodChannel('ch8', jsonMethod);
|
||||||
|
tearDown(() {
|
||||||
|
channel.setMethodCallHandler(null);
|
||||||
|
optionalMethodChannel.setMethodCallHandler(null);
|
||||||
|
});
|
||||||
|
|
||||||
test('can invoke method and get result', () async {
|
test('can invoke method and get result', () async {
|
||||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMessageHandler(
|
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMessageHandler(
|
||||||
'ch7',
|
'ch7',
|
||||||
@ -233,7 +232,6 @@ void main() {
|
|||||||
.having((PlatformException e) => e.message, 'message', equals('sayHello failed')),
|
.having((PlatformException e) => e.message, 'message', equals('sayHello failed')),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
channel.setMethodCallHandler(null);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('can handle method call with other error result', () async {
|
test('can handle method call with other error result', () async {
|
||||||
@ -253,7 +251,6 @@ void main() {
|
|||||||
.having((PlatformException e) => e.message, 'message', equals('Invalid argument(s): bad')),
|
.having((PlatformException e) => e.message, 'message', equals('Invalid argument(s): bad')),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
channel.setMethodCallHandler(null);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('can check the mock handler', () async {
|
test('can check the mock handler', () async {
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// no-shuffle:
|
|
||||||
// //TODO(gspencergoog): Remove this tag once this test's state leaks/test
|
|
||||||
// dependencies have been fixed.
|
|
||||||
// https://github.com/flutter/flutter/issues/85160
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=456"
|
|
||||||
// reduced-test-set:
|
// reduced-test-set:
|
||||||
// This file is run as part of a reduced test set in CI on Mac and Windows
|
// This file is run as part of a reduced test set in CI on Mac and Windows
|
||||||
// machines.
|
// machines.
|
||||||
@ -3750,7 +3745,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
_CreationLocation location = knownLocations[id]!;
|
_CreationLocation location = knownLocations[id]!;
|
||||||
expect(location.file, equals(file));
|
expect(location.file, equals(file));
|
||||||
// ClockText widget.
|
// ClockText widget.
|
||||||
expect(location.line, equals(60));
|
expect(location.line, equals(55));
|
||||||
expect(location.column, equals(9));
|
expect(location.column, equals(9));
|
||||||
expect(location.name, equals('ClockText'));
|
expect(location.name, equals('ClockText'));
|
||||||
expect(count, equals(1));
|
expect(count, equals(1));
|
||||||
@ -3760,7 +3755,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
location = knownLocations[id]!;
|
location = knownLocations[id]!;
|
||||||
expect(location.file, equals(file));
|
expect(location.file, equals(file));
|
||||||
// Text widget in _ClockTextState build method.
|
// Text widget in _ClockTextState build method.
|
||||||
expect(location.line, equals(98));
|
expect(location.line, equals(93));
|
||||||
expect(location.column, equals(12));
|
expect(location.column, equals(12));
|
||||||
expect(location.name, equals('Text'));
|
expect(location.name, equals('Text'));
|
||||||
expect(count, equals(1));
|
expect(count, equals(1));
|
||||||
@ -3787,7 +3782,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
location = knownLocations[id]!;
|
location = knownLocations[id]!;
|
||||||
expect(location.file, equals(file));
|
expect(location.file, equals(file));
|
||||||
// ClockText widget.
|
// ClockText widget.
|
||||||
expect(location.line, equals(60));
|
expect(location.line, equals(55));
|
||||||
expect(location.column, equals(9));
|
expect(location.column, equals(9));
|
||||||
expect(location.name, equals('ClockText'));
|
expect(location.name, equals('ClockText'));
|
||||||
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
||||||
@ -3797,7 +3792,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
location = knownLocations[id]!;
|
location = knownLocations[id]!;
|
||||||
expect(location.file, equals(file));
|
expect(location.file, equals(file));
|
||||||
// Text widget in _ClockTextState build method.
|
// Text widget in _ClockTextState build method.
|
||||||
expect(location.line, equals(98));
|
expect(location.line, equals(93));
|
||||||
expect(location.column, equals(12));
|
expect(location.column, equals(12));
|
||||||
expect(location.name, equals('Text'));
|
expect(location.name, equals('Text'));
|
||||||
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
||||||
|
Loading…
Reference in New Issue
Block a user