OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine.all_the_rest_test; | 8 library engine.all_the_rest_test; |
9 | 9 |
10 import 'package:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
(...skipping 7863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7874 List<String> allTags = info.allTags; | 7874 List<String> allTags = info.allTags; |
7875 expect(allTags, hasLength(4)); | 7875 expect(allTags, hasLength(4)); |
7876 expect(info.getTagWithId("x"), "div"); | 7876 expect(info.getTagWithId("x"), "div"); |
7877 List<String> tagsWithClass = info.getTagsWithClass("c"); | 7877 List<String> tagsWithClass = info.getTagsWithClass("c"); |
7878 expect(tagsWithClass, hasLength(2)); | 7878 expect(tagsWithClass, hasLength(2)); |
7879 } | 7879 } |
7880 } | 7880 } |
7881 | 7881 |
7882 @reflectiveTest | 7882 @reflectiveTest |
7883 class HtmlUnitBuilderTest extends EngineTestCase { | 7883 class HtmlUnitBuilderTest extends EngineTestCase { |
7884 AnalysisContextImpl _context; | 7884 InternalAnalysisContext _context; |
7885 @override | 7885 @override |
7886 void setUp() { | 7886 void setUp() { |
7887 _context = AnalysisContextFactory.contextWithCore(); | 7887 _context = AnalysisContextFactory.contextWithCore(); |
7888 } | 7888 } |
7889 @override | 7889 @override |
7890 void tearDown() { | 7890 void tearDown() { |
7891 _context = null; | 7891 _context = null; |
7892 super.tearDown(); | 7892 super.tearDown(); |
7893 } | 7893 } |
7894 void test_embedded_script() { | 7894 void test_embedded_script() { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8003 expect(variable.name, _expectedName, reason: "script $scriptIndex"); | 8003 expect(variable.name, _expectedName, reason: "script $scriptIndex"); |
8004 } | 8004 } |
8005 } | 8005 } |
8006 | 8006 |
8007 /** | 8007 /** |
8008 * Instances of the class `HtmlWarningCodeTest` test the generation of HTML warn
ing codes. | 8008 * Instances of the class `HtmlWarningCodeTest` test the generation of HTML warn
ing codes. |
8009 */ | 8009 */ |
8010 @reflectiveTest | 8010 @reflectiveTest |
8011 class HtmlWarningCodeTest extends EngineTestCase { | 8011 class HtmlWarningCodeTest extends EngineTestCase { |
8012 /** | 8012 /** |
8013 * The source factory used to create the sources to be resolved. | |
8014 */ | |
8015 SourceFactory _sourceFactory; | |
8016 | |
8017 /** | |
8018 * The analysis context used to resolve the HTML files. | 8013 * The analysis context used to resolve the HTML files. |
8019 */ | 8014 */ |
8020 AnalysisContextImpl _context; | 8015 InternalAnalysisContext _context; |
8021 | 8016 |
8022 /** | 8017 /** |
8023 * The contents of the 'test.html' file. | 8018 * The contents of the 'test.html' file. |
8024 */ | 8019 */ |
8025 String _contents; | 8020 String _contents; |
8026 | 8021 |
8027 /** | 8022 /** |
8028 * The list of reported errors. | 8023 * The list of reported errors. |
8029 */ | 8024 */ |
8030 List<AnalysisError> _errors; | 8025 List<AnalysisError> _errors; |
8031 @override | 8026 @override |
8032 void setUp() { | 8027 void setUp() { |
8033 _sourceFactory = new SourceFactory([new FileUriResolver()]); | 8028 _context = AnalysisContextFactory.contextWithCore(); |
8034 _context = new AnalysisContextImpl(); | |
8035 _context.sourceFactory = _sourceFactory; | |
8036 } | 8029 } |
8037 | 8030 |
8038 @override | 8031 @override |
8039 void tearDown() { | 8032 void tearDown() { |
8040 _sourceFactory = null; | |
8041 _context = null; | 8033 _context = null; |
8042 _contents = null; | 8034 _contents = null; |
8043 _errors = null; | 8035 _errors = null; |
8044 super.tearDown(); | 8036 super.tearDown(); |
8045 } | 8037 } |
8046 | 8038 |
8047 void test_invalidUri() { | 8039 void test_invalidUri() { |
8048 _verify(r''' | 8040 _verify(r''' |
8049 <html> | 8041 <html> |
8050 <script type='application/dart' src='ht:'/> | 8042 <script type='application/dart' src='ht:'/> |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8760 if (_expectedExternalScriptName == null) { | 8752 if (_expectedExternalScriptName == null) { |
8761 expect(scriptSource, isNull, reason: "script $scriptIndex"); | 8753 expect(scriptSource, isNull, reason: "script $scriptIndex"); |
8762 } else { | 8754 } else { |
8763 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); | 8755 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); |
8764 String actualExternalScriptName = scriptSource.shortName; | 8756 String actualExternalScriptName = scriptSource.shortName; |
8765 expect(actualExternalScriptName, _expectedExternalScriptName, | 8757 expect(actualExternalScriptName, _expectedExternalScriptName, |
8766 reason: "script $scriptIndex"); | 8758 reason: "script $scriptIndex"); |
8767 } | 8759 } |
8768 } | 8760 } |
8769 } | 8761 } |
OLD | NEW |