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

Side by Side Diff: runtime/observatory/tests/service/file_service_test.dart

Issue 1341733003: Change times reported from io resource meta data to be milliseconds since epoch (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:developer'; 7 import 'dart:developer';
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 import 'package:observatory/service_io.dart'; 9 import 'package:observatory/service_io.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 expect(result['type'], equals('_openfiles')); 76 expect(result['type'], equals('_openfiles'));
77 77
78 expect(result['data'].length, equals(2)); 78 expect(result['data'].length, equals(2));
79 var writing = await isolate.invokeRpcNoUpgrade( 79 var writing = await isolate.invokeRpcNoUpgrade(
80 '__getFileByID', { 'id' : result['data'][0]['id'] }); 80 '__getFileByID', { 'id' : result['data'][0]['id'] });
81 81
82 expect(writing['total_read'], equals(0)); 82 expect(writing['total_read'], equals(0));
83 expect(writing['read_count'], equals(0)); 83 expect(writing['read_count'], equals(0));
84 expect(writing['write_count'], equals(3)); 84 expect(writing['write_count'], equals(3));
85 expect(writing['total_written'], equals(3)); 85 expect(writing['total_written'], equals(3));
86 expect(writing['last_write'], greaterThan(0));
87 expect(writing['last_read'], equals(0));
86 88
87 var reading = await isolate.invokeRpcNoUpgrade( 89 var reading = await isolate.invokeRpcNoUpgrade(
88 '__getFileByID', { 'id' : result['data'][1]['id'] }); 90 '__getFileByID', { 'id' : result['data'][1]['id'] });
89
90 91
91 expect(reading['total_read'], equals(5)); 92 expect(reading['total_read'], equals(5));
92 expect(reading['read_count'], equals(5)); 93 expect(reading['read_count'], equals(5));
93 expect(reading['write_count'], equals(0)); 94 expect(reading['write_count'], equals(0));
94 expect(reading['total_written'], equals(0)); 95 expect(reading['total_written'], equals(0));
96 expect(reading['last_write'], equals(0));
97 expect(reading['last_read'], greaterThan(0));
98
95 } finally { 99 } finally {
96 await isolate.invokeRpcNoUpgrade('__cleanup', {}); 100 await isolate.invokeRpcNoUpgrade('__cleanup', {});
97 } 101 }
98 }, 102 },
99 ]; 103 ];
100 104
101 main(args) async => runIsolateTests(args, fileTests, testeeBefore:setupFiles); 105 main(args) async => runIsolateTests(args, fileTests, testeeBefore:setupFiles);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698