+ "</body>"
+ "</html>");
parser.registerScanners();
Node scriptNodes[] = parser.extractAllNodesThatAre(ScriptTag.class);
assertType("scriptnode", ScriptTag.class, scriptNodes[0]);
ScriptTag scriptTag = (ScriptTag) scriptNodes[0];
assertStringEquals(
"script code",
"document.write(\"<script "
+ "language=\\\"JavaScript\\\">\");"
+ "document.write(\"function onmousedown"
+ "(event)\");"
+ "document.write(\"{ // do something\"); "
+ "document.write(\"}\"); "
+ "// parser thinks this is the end tag. "
+ "document.write(\"</script>\");",
scriptTag.getScriptCode());
}