anchor.diff:  }
   
   void testOpenNonExistent() {
  -  var file = new File("${tempDir().path}/nonExistentFile");
  +  Directory temp = tempDir();
  +  ReceivePort p = new ReceivePort();
  +  p.receive((x, y) {
  +    p.close();
  +    temp.deleteRecursivelySync();
  +  });
  +  var file = new File("${temp.path}/nonExistentFile");
   
     // Non-existing file should throw exception.
     Expect.throws(() => file.openSync(),
                   (e) => checkOpenNonExistentFileException(e));
   
     file.open(FileMode.READ, (raf) => Expect.fail("Unreachable code"));
  -  file.onError = (e) => checkOpenNonExistentFileException(e);
  +  file.onError = (e) {
  +    checkOpenNonExistentFileException(e);
  +    p.toSendPort().send(null);
  +  };
   }
   
   bool checkDeleteNonExistentFileException(e) {
  
positive.code: }
  
  void testFullPathOnNonExistentDirectory() {
    var file = new File("${tempDir().path}/nonExistentDirectory");
  
    // Full path non-existent directory should throw exception.
    Expect.throws(() => file.fullPathSync(),
                  (e) => checkFullPathOnNonExistentDirectoryException(e));
  
    file.fullPath((path) => Expect.fail("Unreachable code $path"));
    file.onError = (e) => checkFullPathOnNonExistentDirectoryException(e);
  }
  
  bool checkDirectoryInNonExistentDirectoryException(e) {
  
negative.code: testOperateOnClosedFile() {
    Directory temp = tempDir();
    ReceivePort p = new ReceivePort();
    p.receive((x, y) {
      p.close();
      temp.deleteRecursivelySync();
    });
  
    var file = new File("${temp.path}/test_file");
    file.createSync();
    var openedFile = file.openSync(FileMode.READ);
    openedFile.closeSync();
  