org.htmlparser.tests.tagTests
Class ImageTagTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.htmlparser.tests.ParserTestCase
              extended byorg.htmlparser.tests.tagTests.ImageTagTest
All Implemented Interfaces:
junit.framework.Test

public class ImageTagTest
extends ParserTestCase


Field Summary
 
Fields inherited from class org.htmlparser.tests.ParserTestCase
mLexer, node, nodeCount, parser
 
Constructor Summary
ImageTagTest(java.lang.String name)
           
 
Method Summary
 ImageTag extractLinkImage(LinkTag link)
          See bug #753003 within missed when followed by Not reproducible.
 void testDirectRelativeLinks()
           
 void testDynamicRelativeImageScan()
           
 void testEmptyStringElement()
          Test empty attribute.
 void testExtractImageLocnInvertedCommasBug()
          This is the reproduction of a bug which causes a null pointer exception
 void testImageTag()
          The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified.
 void testImageTagBug()
          The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified.
 void testImageTageBug2()
          The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified.
 void testImageTagOnMultipleLines()
          This is the reproduction of a bug reported by Annette Doyle
 void testImageTagsFromYahoo()
          Test case to reproduce bug reported by Annette
 void testImageTagsFromYahooWithAllScannersRegistered()
          Test case to reproduce bug reported by Annette
 void testImageTagSingleQuoteBug()
          This bug occurs when there is a null pointer exception thrown while scanning a tag using LinkScanner.
 void testImageWithNewLineChars()
           
 void testImageWithSpaces()
          Test image url which contains spaces in it.
 void testMapFollowImg()
          See bug #753003 within missed when followed by Not reproducible.
 void testMissingEqualTo()
          Based on a page submitted by Claude Duguay, the image tag has IMG SRC"somefile.jpg" - a missing equal to sign
 void testNullImageBug()
          The bug being reproduced is this :
<A HREF=>Something<A>
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified.
 void testPlaceHolderImageScan()
          This test has been improved to check for params in the image tag, based on requirement by Annette Doyle.
 void testRelativeImageScan()
           
 void testRelativeImageScan2()
           
 void testRelativeImageScan3()
           
 void testToHTML()
           
 
Methods inherited from class org.htmlparser.tests.ParserTestCase
assertHiddenIDTagPresent, assertNodeCount, assertNodeCount, assertSameType, assertStringEquals, assertSuperType, assertTagEquals, assertType, assertXmlEquals, createParser, createParser, createParser, createParser, failWithMessage, getParser, main, parse, parseAndAssertNodeCount, parseNodes, removeEscapeCharacters, setParser
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageTagTest

public ImageTagTest(java.lang.String name)
Method Detail

testImageTag

public void testImageTag()
                  throws ParserException
The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified. Creation date: (6/17/2001 4:01:06 PM)

Throws:
ParserException

testImageTagBug

public void testImageTagBug()
                     throws ParserException
The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified. Creation date: (6/17/2001 4:01:06 PM)

Throws:
ParserException

testImageTageBug2

public void testImageTageBug2()
                       throws ParserException
The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified. Creation date: (6/17/2001 4:01:06 PM)

Throws:
ParserException

testImageTagSingleQuoteBug

public void testImageTagSingleQuoteBug()
                                throws ParserException
This bug occurs when there is a null pointer exception thrown while scanning a tag using LinkScanner. Creation date: (7/1/2001 2:42:13 PM)

Throws:
ParserException

testNullImageBug

public void testNullImageBug()
                      throws ParserException
The bug being reproduced is this :
<A HREF=>Something<A>
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified. Creation date: (6/17/2001 4:01:06 PM)

Throws:
ParserException

testToHTML

public void testToHTML()
                throws ParserException
Throws:
ParserException

extractLinkImage

public ImageTag extractLinkImage(LinkTag link)
See bug #753003 within missed when followed by Not reproducible.


testMapFollowImg

public void testMapFollowImg()
                      throws ParserException
See bug #753003 within missed when followed by Not reproducible.

Throws:
ParserException

testEmptyStringElement

public void testEmptyStringElement()
                            throws ParserException
Test empty attribute. See bug #755929 Empty string attr. value causes attr parsing to be stopped and bug #753012 IMG SRC not parsed v1.3 & v1.4

Throws:
ParserException

testDynamicRelativeImageScan

public void testDynamicRelativeImageScan()
                                  throws ParserException
Throws:
ParserException

testExtractImageLocnInvertedCommasBug

public void testExtractImageLocnInvertedCommasBug()
                                           throws ParserException
This is the reproduction of a bug which causes a null pointer exception

Throws:
ParserException

testPlaceHolderImageScan

public void testPlaceHolderImageScan()
                              throws ParserException
This test has been improved to check for params in the image tag, based on requirement by Annette Doyle. Thereby an important bug was detected.

Throws:
ParserException

testRelativeImageScan

public void testRelativeImageScan()
                           throws ParserException
Throws:
ParserException

testRelativeImageScan2

public void testRelativeImageScan2()
                            throws ParserException
Throws:
ParserException

testRelativeImageScan3

public void testRelativeImageScan3()
                            throws ParserException
Throws:
ParserException

testImageWithSpaces

public void testImageWithSpaces()
                         throws ParserException
Test image url which contains spaces in it. This was actually a bug reported by Sam Joseph (sam@neurogrid.net)

Throws:
ParserException

testImageWithNewLineChars

public void testImageWithNewLineChars()
                               throws ParserException
Throws:
ParserException

testImageTagsFromYahoo

public void testImageTagsFromYahoo()
                            throws ParserException
Test case to reproduce bug reported by Annette

Throws:
ParserException

testImageTagsFromYahooWithAllScannersRegistered

public void testImageTagsFromYahooWithAllScannersRegistered()
                                                     throws ParserException
Test case to reproduce bug reported by Annette

Throws:
ParserException

testImageTagOnMultipleLines

public void testImageTagOnMultipleLines()
                                 throws ParserException
This is the reproduction of a bug reported by Annette Doyle

Throws:
ParserException

testDirectRelativeLinks

public void testDirectRelativeLinks()
                             throws ParserException
Throws:
ParserException

testMissingEqualTo

public void testMissingEqualTo()
                        throws ParserException
Based on a page submitted by Claude Duguay, the image tag has IMG SRC"somefile.jpg" - a missing equal to sign

Throws:
ParserException