| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java | 
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java | 
| index e9b3439ddaab45abb6e2e260e8604b3604ec0ed4..e8f6355e9c9fff5618bb13b4dedb6368ae03a2d5 100644 | 
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java | 
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java | 
| @@ -15,6 +15,7 @@ package com.google.dart.engine.internal.context; | 
|  | 
| import com.google.dart.engine.EngineTestCase; | 
| import com.google.dart.engine.ast.CompilationUnit; | 
| +import com.google.dart.engine.ast.ImportDirective; | 
| import com.google.dart.engine.ast.SimpleIdentifier; | 
| import com.google.dart.engine.ast.TopLevelVariableDeclaration; | 
| import com.google.dart.engine.context.AnalysisContextFactory; | 
| @@ -30,7 +31,9 @@ import com.google.dart.engine.element.HtmlElement; | 
| import com.google.dart.engine.element.LibraryElement; | 
| import com.google.dart.engine.element.PropertyAccessorElement; | 
| import com.google.dart.engine.error.AnalysisError; | 
| +import com.google.dart.engine.html.ast.HtmlScriptTagNode; | 
| import com.google.dart.engine.html.ast.HtmlUnit; | 
| +import com.google.dart.engine.html.ast.XmlTagNode; | 
| import com.google.dart.engine.internal.cache.DartEntry; | 
| import com.google.dart.engine.internal.scope.Namespace; | 
| import com.google.dart.engine.internal.task.ResolveDartLibraryTask; | 
| @@ -869,6 +872,32 @@ public class AnalysisContextImplTest extends EngineTestCase { | 
| assertNotNull(unit); | 
| } | 
|  | 
| +  public void test_parseHtmlUnit_resolveDirectives() throws Exception { | 
| +    Source libSource = addSource("/lib.dart", createSource(// | 
| +        "library lib;", | 
| +        "class ClassA {}")); | 
| +    Source source = addSource("/lib.html", createSource(// | 
| +        "<html>", | 
| +        "<head>", | 
| +        "  <script type='application/dart'>", | 
| +        "    import 'lib.dart';", | 
| +        "    ClassA v = null;", | 
| +        "  </script>", | 
| +        "</head>", | 
| +        "<body>", | 
| +        "</body>", | 
| +        "</html>")); | 
| +    HtmlUnit unit = context.parseHtmlUnit(source); | 
| +    // import directive should be resolved | 
| +    XmlTagNode htmlNode = unit.getTagNodes().get(0); | 
| +    XmlTagNode headNode = htmlNode.getTagNodes().get(0); | 
| +    HtmlScriptTagNode scriptNode = (HtmlScriptTagNode) headNode.getTagNodes().get(0); | 
| +    CompilationUnit script = scriptNode.getScript(); | 
| +    ImportDirective importNode = (ImportDirective) script.getDirectives().get(0); | 
| +    assertNotNull(importNode.getUriContent()); | 
| +    assertEquals(libSource, importNode.getSource()); | 
| +  } | 
| + | 
| public void test_performAnalysisTask_changeLibraryContents() throws Exception { | 
| Source libSource = addSource("/test.dart", "library lib; part 'test-part.dart';"); | 
| Source partSource = addSource("/test-part.dart", "part of lib;"); | 
|  |