diff --git a/lib/ui/painting/image_encoding.cc b/lib/ui/painting/image_encoding.cc index 952e77edda733..15d2d31c9ec75 100644 --- a/lib/ui/painting/image_encoding.cc +++ b/lib/ui/painting/image_encoding.cc @@ -24,6 +24,10 @@ using tonic::DartInvoke; using tonic::DartPersistentValue; using tonic::ToDart; +#ifdef ERROR +#undef ERROR +#endif + namespace blink { namespace { diff --git a/testing/dart/.gitignore b/testing/dart/.gitignore index 93d2a1eaede95..79f51c3d50b9f 100644 --- a/testing/dart/.gitignore +++ b/testing/dart/.gitignore @@ -1,2 +1,3 @@ +.dart_tool .packages pubspec.lock diff --git a/testing/dart/encoding_test.dart b/testing/dart/encoding_test.dart index 22c0a284652d9..27b71dc4787dc 100644 --- a/testing/dart/encoding_test.dart +++ b/testing/dart/encoding_test.dart @@ -7,8 +7,8 @@ import 'dart:ui'; import 'dart:typed_data'; import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; import 'package:path/path.dart' as path; +import 'package:test/test.dart'; const int _kWidth = 10; const int _kRadius = 2; @@ -24,8 +24,9 @@ void main() { expect(new Uint8List.view(data.buffer), getExpectedBytes()); }); - test('Handles greyscale images', () async { - Uint8List png = await new File('../resources/4x4.png').readAsBytes(); + test('Handles grayscale images', () async { + File grayscaleImage = new File(path.join('flutter', 'testing', 'resources', '4x4.png')); + Uint8List png = await grayscaleImage.readAsBytes(); Completer completer = new Completer(); decodeImageFromList(png, (Image image) => completer.complete(image)); Image image = await completer.future; diff --git a/testing/dart/pubspec.yaml b/testing/dart/pubspec.yaml index 2c79b49c89db5..4e8a7f05bb70a 100644 --- a/testing/dart/pubspec.yaml +++ b/testing/dart/pubspec.yaml @@ -1,8 +1,4 @@ name: engine_tests dependencies: - flutter: - sdk: flutter -dev_dependencies: - flutter_test: - sdk: flutter + test: any path: any