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

Unified Diff: runtime/tests/vm/dart/hello_fuchsia_test.dart

Issue 2856913004: [Fuchsia] Allows non-regular files to be opened. (Closed)
Patch Set: Created 3 years, 8 months 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 | « runtime/bin/file_fuchsia.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tests/vm/dart/hello_fuchsia_test.dart
diff --git a/runtime/tests/vm/dart/hello_fuchsia_test.dart b/runtime/tests/vm/dart/hello_fuchsia_test.dart
index 1598f0c0b07d4a7b4387b0cf44115a72073c8668..cc5363ad856ddef6c813413224962b8bbc1b9857 100644
--- a/runtime/tests/vm/dart/hello_fuchsia_test.dart
+++ b/runtime/tests/vm/dart/hello_fuchsia_test.dart
@@ -474,6 +474,18 @@ Future testRecursiveDelete() async {
assert(!await tmp0.exists());
}
+bool testFileOpenDirectoryFails() {
+ File dir = new File(Directory.systemTemp.path);
+ try {
+ dir.openSync();
+ } on FileSystemException catch (e) {
+ return true;
+ } catch (e) {
+ print("Unexpected Exception: $e");
+ return false;
+ }
+}
+
main(List<String> args) async {
if (args.length >= 1) {
if (args[0] == "infinite-loop") {
@@ -539,5 +551,13 @@ main(List<String> args) async {
await testRecursiveDelete();
print("testRecursiveDelete done");
+ print("testFileOpenDirectoryFails");
+ bool result = testFileOpenDirectoryFails();
+ if (result) {
+ print("testFileOpenDirectoryFails done");
+ } else {
+ print("testFileOpenDirectoryFails FAILED");
+ }
+
print("Goodbyte, Fuchsia!");
}
« no previous file with comments | « runtime/bin/file_fuchsia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698