Skip to content

Commit

Permalink
Fix broken Chromebot build (flutter#5018)
Browse files Browse the repository at this point in the history
  • Loading branch information
tvolkert authored Apr 16, 2018
1 parent c17a629 commit d15dc76
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions lib/ui/painting/image_encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ using tonic::DartInvoke;
using tonic::DartPersistentValue;
using tonic::ToDart;

#ifdef ERROR
#undef ERROR
#endif

namespace blink {
namespace {

Expand Down
1 change: 1 addition & 0 deletions testing/dart/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.dart_tool
.packages
pubspec.lock
7 changes: 4 additions & 3 deletions testing/dart/encoding_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<Image> completer = new Completer<Image>();
decodeImageFromList(png, (Image image) => completer.complete(image));
Image image = await completer.future;
Expand Down
6 changes: 1 addition & 5 deletions testing/dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
name: engine_tests
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
test: any
path: any

0 comments on commit d15dc76

Please sign in to comment.