Home | History | Annotate | Download | only in test

Lines Matching refs:html

3 import html.parser
8 class EventCollector(html.parser.HTMLParser):
13 html.parser.HTMLParser.__init__(self, *args, **kw)
117 <!DOCTYPE html PUBLIC 'foo'>
118 <HTML>&entity;&#32;
126 </Html>
129 ("decl", "DOCTYPE html PUBLIC 'foo'"),
131 ("starttag", "html", []),
143 ("endtag", "html"),
222 # from http://www.w3.org/QA/2002/04/valid-dtd-list.html
223 dtds = ['HTML', # HTML5 doctype
224 ('HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" '
226 ('HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" '
228 ('html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '
230 ('html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" '
234 ('html PUBLIC "-//W3C//DTD '
239 'html PUBLIC "-//IETF//DTD HTML 2.0//EN"',
240 'html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"']
281 # these two should be invalid according to the HTML 5 spec,
319 html = ("<!-- I'm a valid comment -->"
333 self._run_check(html, expected)
336 html = ('<!--[if IE & !(lte IE 8)]>aren\'t<![endif]-->'
342 self._run_check(html, expected)
375 html = '&quo &# &#x'
376 for x in range(1, len(html)):
377 self._run_check(html[:x], [('data', html[:x])],
386 self._run_check('<html <html>te>>xt&a<<bc</a></html>\n'
387 '<img src="URL><//img></html</html>', [
388 ('starttag', 'html', [('<html', None)]),
393 ('endtag', 'html'),
396 ('endtag', 'html<')])
419 html = ('<img width=902 height=250px '
429 self._run_check(html, expected)
430 html = ('<a / /foo/ / /=/ / /bar/ / />'
436 self._run_check(html, expected)
438 html = ('<meta><meta / ><meta // ><meta / / >'
446 self._run_check(html, expected)
457 html = ("<html><body bgcolor=d0ca90 text='181008'>"
463 ('starttag', 'html', []),
477 self._run_check(html, expected)
493 # see http://www.w3.org/TR/html5/tokenization.html#end-tag-open-state
495 html = ('<br></label</p><br></div end tmAd-leaderBoard><br></<h4><br>'
515 self._run_check(html, expected)
522 html = '<b>This</b attr=">"> confuses the parser'
527 self._run_check(html, expected)
531 html = ('<div style="" ><b>The <a href="some_url">rain</a> '
549 self._run_check(html, expected)
551 html = '<div style="", foo = "bar" ><b>The <a href="some_url">rain</a>'
560 self._run_check(html, expected)
573 for html, expected in data:
574 self._run_check(html, expected)
577 from html import unescape
584 html = ('<! not really a comment >'
597 self._run_check(html, expected)
601 html = ('<![if !(IE)]>broken condcom<![endif]>'
630 self._run_check(html, expected)
678 "<a title='\u30c6\u30b9\u30c8' href='\u30c6\u30b9\u30c8.html'>",
680 ("href", "\u30c6\u30b9\u30c8.html")])])
682 '<a title="\u30c6\u30b9\u30c8" href="\u30c6\u30b9\u30c8.html">',
684 ("href", "\u30c6\u30b9\u30c8.html")])])
698 "<html foo='&euro;&amp;&#97;&#x61;&unsupported;'>",
699 [("starttag", "html", [("foo", "\u20AC&aa&unsupported;")])])
721 html = (
737 self._run_check(html, expected)
765 self._run_check("<a href=javascript:popup('/popup/help.html')>",
767 [("href", "javascript:popup('/popup/help.html')")])])