Index: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinderTest.java |
=================================================================== |
--- editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinderTest.java (revision 15448) |
+++ editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/util/LibraryReferenceFinderTest.java (working copy) |
@@ -25,6 +25,28 @@ |
assertNotNull(finder); |
} |
+ public void test_LibraryReferenceFinder_malformed() throws Exception { |
+ // issue 6651 |
+ String malformedHtml = "<html><body>" |
+ + "\n <script type=\"application/dart\" src=\"bug.dart\"> /script>" + "\n</body></html>" |
+ + "\n/Network/Servers/hdserver1.hdinternal.net/Users/egrimes/dart/bug/web/bug.html"; |
+ LibraryReferenceFinder finder = new LibraryReferenceFinder(); |
+ finder.processHTML(malformedHtml); |
+ List<String> libraries = finder.getLibraryList(); |
+ assertNotNull(libraries); |
+ assertEquals(1, libraries.size()); |
+ } |
+ |
+ public void test_LibraryReferenceFinder_malformed2() throws Exception { |
+ // issue 6651 |
+ String malformedHtml = "<html><body><script type=\"application/dart\" src=\"bug.dart\""; |
+ LibraryReferenceFinder finder = new LibraryReferenceFinder(); |
+ finder.processHTML(malformedHtml); |
+ List<String> libraries = finder.getLibraryList(); |
+ assertNotNull(libraries); |
+ assertEquals(0, libraries.size()); |
+ } |
+ |
public void test_LibraryReferenceFinder_noScripts() { |
LibraryReferenceFinder finder = new LibraryReferenceFinder(); |
finder.processHTML(HTMLFactory.noScripts()); |