亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? imagetagtest.java

?? 本程序用于對頁面信息進(jìn)行提取并分析
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// HTMLParser Library $Name: v1_6_20060319 $ - A java-based parser for HTML// http://sourceforge.org/projects/htmlparser// Copyright (C) 2004 Somik Raha//// Revision Control Information//// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/ImageTagTest.java,v $// $Author: derrickoswald $// $Date: 2004/09/02 02:28:14 $// $Revision: 1.46 $//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public// License as published by the Free Software Foundation; either// version 2.1 of the License, or (at your option) any later version.//// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//package org.htmlparser.tests.tagTests;import org.htmlparser.Node;import org.htmlparser.PrototypicalNodeFactory;import org.htmlparser.tags.ImageTag;import org.htmlparser.tags.LinkTag;import org.htmlparser.tags.TableColumn;import org.htmlparser.tags.TableRow;import org.htmlparser.tests.ParserTestCase;import org.htmlparser.util.NodeIterator;import org.htmlparser.util.ParserException;import org.htmlparser.util.ParserUtils;public class ImageTagTest extends ParserTestCase{    static    {        System.setProperty ("org.htmlparser.tests.tagTests.ImageTagTest", "ImageTagTest");    }    public ImageTagTest(String name) {        super(name);    }    /**     * The bug being reproduced is this : <BR>     * &lt;BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000 <BR>     * vLink=#551a8b&gt;     * The above line is incorrectly parsed in that, the BODY tag is not identified.     * Creation date: (6/17/2001 4:01:06 PM)     */    public void testImageTag() throws ParserException    {        createParser("<IMG alt=Google height=115 src=\"goo/title_homepage4.gif\" width=305>","http://www.google.com/test/index.html");        parseAndAssertNodeCount(1);        // The node should be an HTMLImageTag        assertTrue("Node should be a HTMLImageTag",node[0] instanceof ImageTag);        ImageTag imageTag = (ImageTag)node[0];        assertEquals("The image locn","http://www.google.com/test/goo/title_homepage4.gif",imageTag.getImageURL());    }    /**     * The bug being reproduced is this : <BR>     * &lt;BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000 <BR>     * vLink=#551a8b&gt;     * The above line is incorrectly parsed in that, the BODY tag is not identified.     * Creation date: (6/17/2001 4:01:06 PM)     */    public void testImageTagBug() throws ParserException    {        createParser("<IMG alt=Google height=115 src=\"../goo/title_homepage4.gif\" width=305>","http://www.google.com/test/");        parseAndAssertNodeCount(1);        // The node should be an HTMLImageTag        assertTrue("Node should be a HTMLImageTag",node[0] instanceof ImageTag);        ImageTag imageTag = (ImageTag)node[0];        assertEquals("The image locn","http://www.google.com/goo/title_homepage4.gif",imageTag.getImageURL());    }    /**     * The bug being reproduced is this : <BR>     * &lt;BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000 <BR>     * vLink=#551a8b&gt;     * The above line is incorrectly parsed in that, the BODY tag is not identified.     * Creation date: (6/17/2001 4:01:06 PM)     */    public void testImageTageBug2() throws ParserException    {        createParser("<IMG alt=Google height=115 src=\"../../goo/title_homepage4.gif\" width=305>","http://www.google.com/test/test/index.html");        parseAndAssertNodeCount(1);        // The node should be an HTMLImageTag        assertTrue("Node should be a HTMLImageTag",node[0] instanceof ImageTag);        ImageTag imageTag = (ImageTag)node[0];        assertEquals("The image locn","http://www.google.com/goo/title_homepage4.gif",imageTag.getImageURL());    }    /**     * 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)     */    public void testImageTagSingleQuoteBug() throws ParserException    {        createParser("<IMG SRC='abcd.jpg'>","http://www.cj.com/");        parseAndAssertNodeCount(1);        assertTrue("Node should be a HTMLImageTag",node[0] instanceof ImageTag);        ImageTag imageTag = (ImageTag)node[0];        assertEquals("Image incorrect","http://www.cj.com/abcd.jpg",imageTag.getImageURL());    }    /**     * The bug being reproduced is this : <BR>     * &lt;A HREF=&gt;Something&lt;A&gt;<BR>     * vLink=#551a8b&gt;     * The above line is incorrectly parsed in that, the BODY tag is not identified.     * Creation date: (6/17/2001 4:01:06 PM)     */    public void testNullImageBug() throws ParserException    {        createParser("<IMG SRC=>","http://www.google.com/test/index.html");        parseAndAssertNodeCount(1);        // The node should be an HTMLLinkTag        assertTrue("Node should be a HTMLImageTag",node[0] instanceof ImageTag);        ImageTag imageTag = (ImageTag)node[0];        assertStringEquals("The image location","",imageTag.getImageURL());    }    public void testToHTML() throws ParserException {        String img = "<IMG alt=Google height=115 src=\"../../goo/title_homepage4.gif\" width=305>";        createParser(img,"http://www.google.com/test/test/index.html");        parseAndAssertNodeCount(1);        // The node should be an ImageTag        assertTrue("Node should be a ImageTag",node[0] instanceof ImageTag);        ImageTag imageTag = (ImageTag)node[0];        assertStringEquals("toHtml",img,imageTag.toHtml());        assertEquals("Alt","Google",imageTag.getAttribute("alt"));        assertEquals("Height","115",imageTag.getAttribute("height"));        assertEquals("Width","305",imageTag.getAttribute("width"));    }    /**     * See bug #753003 <IMG> within <A> missed when followed by <MAP>     * Not reproducible.     */    public ImageTag extractLinkImage (LinkTag link)    {        Node[] list = ParserUtils.findTypeInNode (link, ImageTag.class);        return (0 == list.length ? null : (ImageTag)list[0]);    }    /**     * See bug #753003 <IMG> within <A> missed when followed by <MAP>     * Not reproducible.     */    public void testMapFollowImg () throws ParserException    {        String html = "<a href=\"Biography/Biography.html\" "            + "onMouseOut=\"MM_swapImgRestore()\" "            + "onMouseOver=\"MM_swapImage('Image13','','Graphics/SchneiderPic1.gif',1)\">"            + "<img name=\"Image13\" border=\"0\" src=\"Graphics/SchneiderPic.gif\" "            + "width=\"127\" height=\"175\" usemap=\"#Image13Map\" "            + "alt=\"Graphics/SchneiderPic.gif\"> <map name=\"Image13Map\">"            + "<area shape=\"circle\" coords=\"67,88,66\" href=\"Biography/Biography.html\" "            + "onClick=\"newWindow('Biography/Biography.html','HTML','menubar=yes,scrollbars=yes,resizable=yes,left=0,top=0'); return false\" target=\"HTML\">"            + "</map>"            + "</a>";        createParser (html);        parseAndAssertNodeCount (1);        assertTrue ("Node should be a LinkTag", node[0] instanceof LinkTag);        LinkTag link = (LinkTag)node[0];        ImageTag img = extractLinkImage (link);        assertNotNull ("no image tag", img);    }    /**     * 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     */    public void testEmptyStringElement () throws ParserException    {        String html = "<img height=\"1\" width=\"1\" alt=\"\" "            + "src=\"http://i.cnn.net/cnn/images/1.gif\"/>";        createParser (html);        parseAndAssertNodeCount (1);        assertTrue ("Node should be an ImageTag", node[0] instanceof ImageTag);        ImageTag img = (ImageTag)node[0];        assertTrue ("bad source", "http://i.cnn.net/cnn/images/1.gif".equals (img.getImageURL ()));    }    public void testDynamicRelativeImageScan() throws ParserException {        createParser("<IMG SRC=\"../abc/def/mypic.jpg\">","http://www.yahoo.com/ghi?abcdefg");        parseAndAssertNodeCount(1);        assertTrue("Node identified should be HTMLImageTag",node[0] instanceof ImageTag);        ImageTag imageTag = (ImageTag)node[0];        assertEquals("Expected Link","http://www.yahoo.com/abc/def/mypic.jpg",imageTag.getImageURL());    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人18视频日本| 欧美精品vⅰdeose4hd| 国产在线精品一区二区三区不卡 | 精品在线观看视频| 日本vs亚洲vs韩国一区三区| 日韩黄色一级片| 日本中文在线一区| 日韩电影在线免费观看| 免费在线观看不卡| 久久精品国产亚洲高清剧情介绍| 看国产成人h片视频| 精东粉嫩av免费一区二区三区| 国产成人免费视频网站高清观看视频 | 91视频观看视频| 91麻豆视频网站| 欧美中文字幕亚洲一区二区va在线| 欧美日韩中文字幕一区二区| 欧美麻豆精品久久久久久| 91精品国产福利在线观看| 337p日本欧洲亚洲大胆精品| 久久久影视传媒| 国产精品久久久久久久裸模| 一区二区三区四区在线播放| 日韩中文字幕1| 国产一区视频在线看| 国产成人av一区| 91国偷自产一区二区使用方法| 欧美日韩三级一区| 日韩欧美在线123| 中文字幕精品一区二区精品绿巨人| 中文字幕一区视频| 亚洲成人精品在线观看| 狠狠久久亚洲欧美| 99精品视频一区| 欧美精品18+| 久久久久久**毛片大全| 在线免费视频一区二区| 色8久久人人97超碰香蕉987| 欧美嫩在线观看| 久久综合久色欧美综合狠狠| 国产精品盗摄一区二区三区| 亚洲va欧美va国产va天堂影院| 韩国三级在线一区| 日韩久久免费av| 亚洲女厕所小便bbb| 日产国产欧美视频一区精品| av在线综合网| 欧美一二三在线| 17c精品麻豆一区二区免费| 免费观看一级欧美片| av一区二区不卡| 精品盗摄一区二区三区| 亚洲一区二区三区四区五区黄 | 婷婷综合五月天| 成人丝袜高跟foot| 日韩一区二区三区观看| 亚洲欧美影音先锋| 看电视剧不卡顿的网站| 欧洲一区二区三区免费视频| 国产调教视频一区| 石原莉奈一区二区三区在线观看| 蜜臀91精品一区二区三区| 偷偷要91色婷婷| 成人综合在线网站| 这里只有精品99re| 亚洲激情第一区| 国产精品白丝av| 日韩网站在线看片你懂的| 一二三区精品视频| 国产成人免费在线| 日韩欧美国产系列| 亚洲国产成人高清精品| 成人免费高清视频在线观看| 精品黑人一区二区三区久久| 婷婷综合在线观看| 在线一区二区三区| 欧美韩国日本综合| 国产精品综合二区| 日韩欧美aaaaaa| 日本不卡高清视频| 欧美日韩一级二级三级| 亚洲人午夜精品天堂一二香蕉| 欧美日韩国产综合草草| 亚洲女同一区二区| www.亚洲在线| 国产欧美视频一区二区三区| 麻豆精品新av中文字幕| 欧美一区二区三区在线电影| 亚洲一区二区三区激情| 色噜噜狠狠一区二区三区果冻| 国产精品久久二区二区| 国产不卡在线视频| 欧美激情在线一区二区三区| 国产精品一区三区| 久久久不卡网国产精品二区| 国产一区 二区 三区一级| 精品国产一区二区三区久久久蜜月| 蜜臀av一级做a爰片久久| 制服丝袜中文字幕亚洲| 午夜精品在线视频一区| 欧美久久久久久久久| 日韩av在线播放中文字幕| 在线播放91灌醉迷j高跟美女| a级精品国产片在线观看| 成人午夜私人影院| 久久青草欧美一区二区三区| 美女爽到高潮91| 日韩亚洲欧美在线观看| 麻豆精品一二三| 久久婷婷国产综合精品青草| 国产黑丝在线一区二区三区| 中文字幕乱码亚洲精品一区| 成人黄色电影在线 | 国产视频亚洲色图| 成人av免费在线| 亚洲男人的天堂av| 欧美日韩在线三级| 欧美96一区二区免费视频| 精品国产伦一区二区三区观看方式| 国产美女在线精品| 国产精品私人影院| 91福利在线看| 日本sm残虐另类| 久久精品视频一区二区三区| 99精品视频在线观看| 亚洲成人动漫在线免费观看| 欧美哺乳videos| 成人夜色视频网站在线观看| 一区二区三区在线免费观看| 91麻豆精品国产91久久久| 极品少妇xxxx精品少妇| 日韩一级黄色片| 亚洲综合一区二区精品导航| 色综合天天在线| 国产三级精品三级| 国产成人午夜精品影院观看视频| 国产午夜精品福利| 国产成a人无v码亚洲福利| 一区二区三区在线观看欧美| 欧美肥妇bbw| 国精产品一区一区三区mba视频 | 国内外成人在线| 久久久久久日产精品| 激情伊人五月天久久综合| 国产欧美日韩卡一| 色综合久久综合网97色综合| 亚洲电影第三页| 欧美猛男超大videosgay| 久久er精品视频| 亚洲色图欧美激情| 欧美高清性hdvideosex| 精品一区二区三区免费毛片爱 | 国产精品国产三级国产三级人妇| 国产成人在线观看免费网站| 亚洲卡通欧美制服中文| 色婷婷久久久综合中文字幕| 国产在线视频精品一区| 日韩理论在线观看| 91精品蜜臀在线一区尤物| 国产在线不卡一区| 亚洲成人先锋电影| 久久久久9999亚洲精品| 91黄色免费看| 国产一本一道久久香蕉| 日韩精品欧美精品| 国产精品美女久久久久av爽李琼 | 蜜桃av一区二区三区电影| 国产欧美日韩另类一区| 欧美一级电影网站| av亚洲精华国产精华精| 美日韩黄色大片| 国产精品动漫网站| 欧美视频在线观看一区| av高清久久久| 免费人成网站在线观看欧美高清| 日韩理论电影院| 制服丝袜av成人在线看| 色婷婷激情一区二区三区| 激情久久五月天| 亚洲国产精品视频| 久久蜜桃一区二区| 91精品国产黑色紧身裤美女| 成人国产精品免费| 精品在线一区二区三区| 亚洲欧美电影一区二区| 国产精品久久久久久久午夜片 | 亚洲一区二区3| 国产日韩欧美一区二区三区综合| 欧美裸体一区二区三区| 国内精品在线播放| 免费成人小视频| 亚洲一二三四在线| 国产精品久久久久久久久晋中| 精品久久一区二区三区| 欧美日韩综合不卡| 成人激情视频网站| 韩国女主播一区| 青娱乐精品视频| 香蕉成人伊视频在线观看| 国产精品美女一区二区三区 |