Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Unified Diff: tests/standalone/src/DirectoryInvalidArgumentsTest.dart

Issue 8386029: Consistently use setters to set event handlers in native APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/chat/http_impl.dart ('k') | tests/standalone/src/DirectoryTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/DirectoryInvalidArgumentsTest.dart
diff --git a/tests/standalone/src/DirectoryInvalidArgumentsTest.dart b/tests/standalone/src/DirectoryInvalidArgumentsTest.dart
index 2265685c250bd1e3244f7dcc909f4646066ffcbb..b83e191c64c97294cac8f3bd1a3912c023e958de 100644
--- a/tests/standalone/src/DirectoryInvalidArgumentsTest.dart
+++ b/tests/standalone/src/DirectoryInvalidArgumentsTest.dart
@@ -5,28 +5,28 @@
class DirectoryInvalidArgumentsTest {
static void testFailingList(Directory d, var recursive) {
int errors = 0;
- d.setErrorHandler((error) {
+ d.errorHandler = (error) {
errors += 1;
- });
- d.setDoneHandler((completed) {
+ };
+ d.doneHandler = (completed) {
Expect.equals(1, errors);
Expect.isFalse(completed);
- });
+ };
Expect.equals(0, errors);
d.list(recursive);
}
static void testInvalidArguments() {
Directory d = new Directory(12);
- Expect.isFalse(d.exists());
+ Expect.isFalse(d.existsSync());
try {
- d.delete();
+ d.deleteSync();
Expect.fail("No exception thrown");
} catch (var e) {
Expect.isTrue(e is DirectoryException);
}
try {
- d.create();
+ d.createSync();
Expect.fail("No exception thrown");
} catch (var e) {
Expect.isTrue(e is DirectoryException);
« no previous file with comments | « samples/chat/http_impl.dart ('k') | tests/standalone/src/DirectoryTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698