Import dart:ui as ui (instead of as sky)

This commit is contained in:
Adam Barth
2015-10-09 20:55:54 -07:00
parent 65eba90843
commit ecce1eb389
100 changed files with 737 additions and 737 deletions

View File

@@ -1,4 +1,4 @@
import 'dart:ui' as sky;
import 'dart:ui' as ui;
import 'dart:ui' show Rect, Color, Paint;
import 'package:test/test.dart';
@@ -6,8 +6,8 @@ import 'package:vector_math/vector_math_64.dart';
void main() {
sky.PictureRecorder recorder = new sky.PictureRecorder();
sky.Canvas canvas = new sky.Canvas(recorder, new Rect.fromLTRB(0.0, 0.0, 100.0, 100.0));
ui.PictureRecorder recorder = new ui.PictureRecorder();
ui.Canvas canvas = new ui.Canvas(recorder, new Rect.fromLTRB(0.0, 0.0, 100.0, 100.0));
test("matrix access should work", () {
// Matrix equality doesn't work!

View File

@@ -1,11 +1,11 @@
import 'dart:ui' as sky;
import 'dart:ui' as ui;
import 'package:test/test.dart';
void main() {
test('should be settable using "style" attribute', () {
sky.LayoutRoot layoutRoot = new sky.LayoutRoot();
var document = new sky.Document();
ui.LayoutRoot layoutRoot = new ui.LayoutRoot();
var document = new ui.Document();
var foo = document.createElement('foo');
layoutRoot.rootElement = foo;
@@ -16,8 +16,8 @@ void main() {
});
test('should not crash when setting style to null', () {
sky.LayoutRoot layoutRoot = new sky.LayoutRoot();
var document = new sky.Document();
ui.LayoutRoot layoutRoot = new ui.LayoutRoot();
var document = new ui.Document();
var foo = document.createElement('foo');
layoutRoot.rootElement = foo;

View File

@@ -1,8 +1,8 @@
import 'dart:ui' as sky;
import 'dart:ui' as ui;
export 'dart:ui' show Point;
class TestPointerEvent extends sky.PointerEvent {
class TestPointerEvent extends ui.PointerEvent {
TestPointerEvent({
this.type,
this.pointer,
@@ -64,9 +64,9 @@ class TestPointer {
int pointer;
bool isDown = false;
sky.Point location;
ui.Point location;
sky.PointerEvent down([sky.Point newLocation = sky.Point.origin ]) {
ui.PointerEvent down([ui.Point newLocation = ui.Point.origin ]) {
assert(!isDown);
isDown = true;
location = newLocation;
@@ -78,9 +78,9 @@ class TestPointer {
);
}
sky.PointerEvent move([sky.Point newLocation = sky.Point.origin ]) {
ui.PointerEvent move([ui.Point newLocation = ui.Point.origin ]) {
assert(isDown);
sky.Offset delta = newLocation - location;
ui.Offset delta = newLocation - location;
location = newLocation;
return new TestPointerEvent(
type: 'pointermove',
@@ -92,7 +92,7 @@ class TestPointer {
);
}
sky.PointerEvent up() {
ui.PointerEvent up() {
assert(isDown);
isDown = false;
return new TestPointerEvent(
@@ -103,7 +103,7 @@ class TestPointer {
);
}
sky.PointerEvent cancel() {
ui.PointerEvent cancel() {
assert(isDown);
isDown = false;
return new TestPointerEvent(

View File

@@ -1,10 +1,10 @@
import 'dart:ui' as sky;
import 'dart:ui' as ui;
import 'package:test/test.dart';
void main() {
test("createText(null) shouldn't crash", () {
var doc = new sky.Document();
var doc = new ui.Document();
doc.createText(null);
});
}