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

Side by Side Diff: tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart

Issue 28823004: mark barback test "too_many_open_files_test" as flaky (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « pkg/pkg.status ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Test of the graph segmentation algorithm used by deferred loading 5 // Test of the graph segmentation algorithm used by deferred loading
6 // to determine which elements can be deferred and which libraries 6 // to determine which elements can be deferred and which libraries
7 // much be included in the initial download (loaded eagerly). 7 // much be included in the initial download (loaded eagerly).
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
(...skipping 18 matching lines...) Expand all
29 ['--analyze-only']); 29 ['--analyze-only']);
30 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) { 30 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
31 var main = compiler.mainApp.find(dart2js.Compiler.MAIN); 31 var main = compiler.mainApp.find(dart2js.Compiler.MAIN);
32 Expect.isNotNull(main, "Could not find 'main'"); 32 Expect.isNotNull(main, "Could not find 'main'");
33 compiler.deferredLoadTask.onResolutionComplete(main); 33 compiler.deferredLoadTask.onResolutionComplete(main);
34 34
35 var deferredClasses = 35 var deferredClasses =
36 compiler.deferredLoadTask.allDeferredElements.where((e) => e.isClass()) 36 compiler.deferredLoadTask.allDeferredElements.where((e) => e.isClass())
37 .toSet(); 37 .toSet();
38 38
39 var dateTime = 39 var dateTime = deferredClasses.where((e) => e.name == 'DateTime').single;
40 deferredClasses
41 .where((e) => e.name == 'DateTime').single;
42 40
43 var myClass = 41 var myClass = deferredClasses.where((e) => e.name == 'MyClass').single;
44 deferredClasses.where((e) => e.name == 'MyClass').single;
45 42
46 var deferredLibrary = compiler.libraries['memory:deferred.dart']; 43 var deferredLibrary = compiler.libraries['memory:deferred.dart'];
47 44
48 Expect.equals(deferredLibrary, myClass.getLibrary()); 45 Expect.equals(deferredLibrary, myClass.getLibrary());
49 Expect.equals(compiler.coreLibrary, dateTime.declaration.getLibrary()); 46 Expect.equals(compiler.coreLibrary, dateTime.declaration.getLibrary());
50 })); 47 }));
51 } 48 }
52 49
53 const Map MEMORY_SOURCE_FILES = const { 50 const Map MEMORY_SOURCE_FILES = const {
54 'main.dart': """ 51 'main.dart': """
(...skipping 16 matching lines...) Expand all
71 class MyClass { 68 class MyClass {
72 const MyClass(); 69 const MyClass();
73 70
74 foo(x) { 71 foo(x) {
75 new DateTime.now(); 72 new DateTime.now();
76 return (x - 3) ~/ 2; 73 return (x - 3) ~/ 2;
77 } 74 }
78 } 75 }
79 """, 76 """,
80 }; 77 };
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698