Thread: [Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/tagTests ImageTagTest.java,1.45,1.46 ScriptTagT
Brought to you by:
derrickoswald
From: Derrick O. <der...@us...> - 2004-09-02 02:28:54
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29769/src/org/htmlparser/tests/tagTests Modified Files: ImageTagTest.java ScriptTagTest.java JspTagTest.java TagTest.java LinkTagTest.java Log Message: Implemented: RFE #1017249 HTML Client Doesn't Support Cookies but will follow redirect RFE #1010586 Add support for password protected URL and RFE #1000739 Add support for proxy scenario A new http package is added, the primary class being Connectionmanager which handles proxies, passwords and cookies. Some testing still needed. Also removed some line separator cruft. Index: ImageTagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/ImageTagTest.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ImageTagTest.java 31 Jul 2004 16:42:31 -0000 1.45 --- ImageTagTest.java 2 Sep 2004 02:28:14 -0000 1.46 *************** *** 28,32 **** import org.htmlparser.Node; - import org.htmlparser.Parser; import org.htmlparser.PrototypicalNodeFactory; import org.htmlparser.tags.ImageTag; --- 28,31 ---- *************** *** 272,276 **** { createParser("<IMG SRC=\"../abc/def/Hello \r\nWorld.jpg\">","http://www.yahoo.com/ghi"); - Parser.setLineSeparator("\r\n"); parseAndAssertNodeCount(1); assertTrue("Node identified should be HTMLImageTag",node[0] instanceof ImageTag); --- 271,274 ---- Index: LinkTagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/LinkTagTest.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** LinkTagTest.java 31 Jul 2004 16:42:31 -0000 1.51 --- LinkTagTest.java 2 Sep 2004 02:28:14 -0000 1.52 *************** *** 28,32 **** import org.htmlparser.Node; - import org.htmlparser.Parser; import org.htmlparser.PrototypicalNodeFactory; import org.htmlparser.Tag; --- 28,31 ---- *************** *** 125,129 **** "href=" + link2 + ">��ï</a> <a\n"+ "href=" + link3 + ">�q�T��</a> ","http://www.cj.com"); - Parser.setLineSeparator("\r\n"); parseAndAssertNodeCount(6); assertTrue("Node should be a LinkTag",node[2] instanceof LinkTag); --- 124,127 ---- *************** *** 245,249 **** "<LI><font color=\"FF0000\" size=-1><b>Tech Samachar:</b></font>" + link2 + " by Rajesh Jain","http://www.cj.com/"); - Parser.setLineSeparator("\r\n"); parser.setNodeFactory (new PrototypicalNodeFactory (new LinkTag ())); parseAndAssertNodeCount(10); --- 243,246 ---- *************** *** 500,504 **** "href=\"http://ads.samachar.com/bin/redirect/tech.txt?http://www.samachar.com/tech\n"+ "nical.html\"> Journalism 3.0</a> by Rajesh Jain"); - Parser.setLineSeparator("\r\n"); parser.setNodeFactory (new PrototypicalNodeFactory (new LinkTag ())); parseAndAssertNodeCount(8); --- 497,500 ---- Index: JspTagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/JspTagTest.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** JspTagTest.java 2 Jul 2004 00:49:31 -0000 1.45 --- JspTagTest.java 2 Sep 2004 02:28:14 -0000 1.46 *************** *** 27,31 **** package org.htmlparser.tests.tagTests; - import org.htmlparser.Parser; import org.htmlparser.PrototypicalNodeFactory; import org.htmlparser.Tag; --- 27,30 ---- *************** *** 83,87 **** "<" + contents2 + ">\n<jsp:forward page=\"transferConfirm.jsp\"/><%\n"+ "%>"); - Parser.setLineSeparator("\r\n"); parser.setNodeFactory (new PrototypicalNodeFactory (new JspTag ())); parseAndAssertNodeCount(8); --- 82,85 ---- *************** *** 137,141 **** + "%><jsp:forward page=\"transferConfirm.jsp\"/><%\n"+ "%>\n"); - Parser.setLineSeparator("\r\n"); parser.setNodeFactory (new PrototypicalNodeFactory (new JspTag ())); parseAndAssertNodeCount(8); --- 135,138 ---- Index: ScriptTagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/ScriptTagTest.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ScriptTagTest.java 31 Jul 2004 16:42:31 -0000 1.45 --- ScriptTagTest.java 2 Sep 2004 02:28:14 -0000 1.46 *************** *** 27,31 **** package org.htmlparser.tests.tagTests; - import org.htmlparser.Parser; import org.htmlparser.PrototypicalNodeFactory; import org.htmlparser.tags.ScriptTag; --- 27,30 ---- *************** *** 96,100 **** createParser(testHTML1); - Parser.setLineSeparator("\r\n"); parser.setNodeFactory (new PrototypicalNodeFactory (new ScriptTag ())); parseAndAssertNodeCount(3); --- 95,98 ---- Index: TagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/TagTest.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** TagTest.java 31 Jul 2004 16:42:31 -0000 1.61 --- TagTest.java 2 Sep 2004 02:28:14 -0000 1.62 *************** *** 30,34 **** import org.htmlparser.Node; - import org.htmlparser.Parser; import org.htmlparser.PrototypicalNodeFactory; import org.htmlparser.Tag; --- 30,33 ---- *************** *** 546,550 **** String testHTML = "<html><body>text\n<>text</body></html>"; createParser(testHTML); - Parser.setLineSeparator ("\r\n"); // actually a static method parseAndAssertNodeCount(1); assertTrue("Only node should be an HTML node",node[0] instanceof Html); --- 545,548 ---- *************** *** 566,570 **** String testHTML = "<html><body>text<\n>text</body></html>"; createParser(testHTML); - Parser.setLineSeparator ("\r\n"); // actually a static method parseAndAssertNodeCount(1); assertTrue("Only node should be an HTML node",node[0] instanceof Html); --- 564,567 ---- *************** *** 586,590 **** String testHTML = "<html><body>text<>\ntext</body></html>"; createParser(testHTML); - Parser.setLineSeparator ("\r\n"); // actually a static method parseAndAssertNodeCount(1); assertTrue("Only node should be an HTML node",node[0] instanceof Html); --- 583,586 ---- |