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

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

Issue 8578003: Implement setPosition on File to seek to a byte position. (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
« runtime/bin/file_impl.dart ('K') | « runtime/bin/file_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/FileTest.dart
diff --git a/tests/standalone/src/FileTest.dart b/tests/standalone/src/FileTest.dart
index 9733f96ae8eb93d86112a89b237ec579554f4b9b..b16829587b5fd5990c4819deb05b1965c285109f 100644
--- a/tests/standalone/src/FileTest.dart
+++ b/tests/standalone/src/FileTest.dart
@@ -274,7 +274,14 @@ class FileTest {
input.readListHandler = (bytes_read) {
input.positionHandler = (position) {
Expect.equals(18, position);
- input.close();
+ input.setPositionHandler = () {
+ input.positionHandler = (position) {
+ Expect.equals(8, position);
+ input.close();
+ };
+ input.position();
+ };
+ input.setPosition(8);
};
};
input.readList(buffer, 12, 6);
@@ -297,6 +304,8 @@ class FileTest {
Expect.equals(12, input.positionSync());
input.readListSync(buffer, 12, 6);
Expect.equals(18, input.positionSync());
+ input.setPositionSync(8);
+ Expect.equals(8, input.positionSync());
input.closeSync();
return 1;
}
« runtime/bin/file_impl.dart ('K') | « runtime/bin/file_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698