+ "if (!hp.isHomePage('http://www.google.com/')) {document.write(\"<p><a href=\"/mgyhp.html\" onClick=\"style.behavior='url(#default#homepage)';setHomePage('http://www.google.com/');\">Make Google Your Homepage!</a>\");}\n"
+ "</script></font>\n"
+ "<p><font size=-2>©2002 Google</font><font size=-2> - Searching 3,083,324,652 web pages</font></center></body></html>\n");
parser.registerScanners();
int i = 0;
NodeList collectionList = new NodeList();
for (NodeIterator e = parser.elements(); e.hasMoreNodes();)
{
Node node = e.nextNode();
node.collectInto(collectionList, LinkTag.class);
}
assertEquals(
"Size of collection vector should be 11",
11,
collectionList.size());
// All items in collection vector should be links
for (SimpleNodeIterator e = collectionList.elements();
e.hasMoreNodes();
)
{
Node node = e.nextNode();
assertTrue(