123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595 |
- Num Tests: 73
- OpenID link parsing test cases
- Copyright (C) 2005-2008, JanRain, Inc.
- See COPYING for license information.
- File format
- -----------
- All text before the first triple-newline (this chunk) should be ignored.
- This file may be interpreted as Latin-1 or UTF-8.
- Test cases separated by three line separators (`\n\n\n'). The test
- cases consist of a headers section followed by a data block. These are
- separated by a double newline. The headers consist of the header name,
- followed by a colon, a space, the value, and a newline. There must be
- one, and only one, `Name' header for a test case. There may be zero or
- more link headers. The `Link' header consists of whitespace-separated
- attribute pairs. A link header with an empty string as a value
- indicates an empty but present link tag. The attribute pairs are `='
- separated and not quoted.
- Optional Links and attributes have a trailing `*'. A compilant
- implementation may produce this as output or may not. A compliant
- implementation will not produce any output that is absent from this
- file.
- Name: Well-formed link rel (in CAPS)
- Link: rel=openid.server href=http://www.myopenid.com/server
- <HTML>
- <HEAD>
- <LINK REL="openid.server"
- HREF="http://www.myopenid.com/server" />
- </HEAD>
- </HTML>
- Name: No link tag at all
- <html>
- <head>
- </head>
- </html>
- Name: Link element first
- <link>
- Name: Link inside HTML, not head
- <html>
- <link>
- Name: Link inside head, not html
- <head>
- <link>
- Name: Link inside html, after head
- <html>
- <head>
- </head>
- <link>
- Name: Link inside html, before head
- <html>
- <link>
- <head>
- Name: Link before html and head
- <link>
- <html>
- <head>
- Name: Link after html document with head
- <html>
- <head>
- </head>
- </html>
- <link>
- Name: Link inside html inside head, inside another html
- <html>
- <head>
- <html>
- <link>
- Name: Link inside html inside head
- <head>
- <html>
- <link>
- Name: link inside body inside head inside html
- <html>
- <head>
- <body>
- <link>
- Name: Link inside head inside head inside html
- <html>
- <head>
- <head>
- <link>
- Name: Link inside script inside head inside html
- <html>
- <head>
- <script>
- <link>
- </script>
- Name: Link inside comment inside head inside html
- <html>
- <head/>
- <link>
- Name: Link inside of head after short head
- <html>
- <head/>
- <head>
- <link>
- Name: Plain vanilla
- Link:
- <html>
- <head>
- <link>
- Name: Ignore tags in the <script:... > namespace
- Link*:
- <html>
- <head>
- <script:paddypan>
- <link>
- </script:paddypan>
- Name: Short link tag
- Link:
- <html>
- <head>
- <link/>
- Name: Spaces in the HTML tag
- Link:
- <html >
- <head>
- <link>
- Name: Spaces in the head tag
- Link:
- <html>
- <head >
- <link>
- Name: Spaces in the link tag
- Link:
- <html>
- <head>
- <link >
- Name: No whitespace
- Link:
- <html><head><link>
- Name: Closed head tag
- Link:
- <html>
- <head>
- <link>
- </head>
- Name: One good, one bad (after close head)
- Link:
- <html>
- <head>
- <link>
- </head>
- <link>
- Name: One good, one bad (after open body)
- Link:
- <html>
- <head>
- <link>
- <body>
- <link>
- Name: ill formed (missing close head)
- Link:
- <html>
- <head>
- <link>
- </html>
- Name: Ill formed (no close head, link after </html>)
- Link:
- <html>
- <head>
- <link>
- </html>
- <link>
- Name: Ignore random tags inside of html
- Link:
- <html>
- <delicata>
- <head>
- <title>
- <link>
- Name: case-folding
- Link*:
- <HtMl>
- <hEaD>
- <LiNk>
- Name: unexpected tags
- Link:
- <butternut>
- <html>
- <summer>
- <head>
- <turban>
- <link>
- Name: un-closed script tags
- Link*:
- <html>
- <head>
- <script>
- <link>
- Name: un-closed script tags (no whitespace)
- Link*:
- <html><head><script><link>
- Name: un-closed comment
- Link*:
- <html>
- <head>
- <!--
- <link>
- Name: un-closed CDATA
- Link*:
- <html>
- <head>
- <![CDATA[
- <link>
- Name: cdata-like
- Link*:
- <html>
- <head>
- <![ACORN[
- <link>
- ]]>
- Name: comment close only
- Link:
- <html>
- <head>
- <link>
- -->
- Name: Vanilla, two links
- Link:
- Link:
- <html>
- <head>
- <link>
- <link>
- Name: extra tag, two links
- Link:
- Link:
- <html>
- <gold nugget>
- <head>
- <link>
- <link>
- Name: case-fold, body ends, two links
- Link:
- Link*:
- <html>
- <head>
- <link>
- <LiNk>
- <body>
- <link>
- Name: simple, non-quoted rel
- Link: rel=openid.server
- <html><head><link rel=openid.server>
- Name: short tag has rel
- Link: rel=openid.server
- <html><head><link rel=openid.server/>
- Name: short tag w/space has rel
- Link: rel=openid.server
- <html><head><link rel=openid.server />
- Name: extra non-attribute, has rel
- Link: rel=openid.server
- <html><head><link hubbard rel=openid.server>
- Name: non-attr, has rel, short
- Link: rel=openid.server
- <html><head><link hubbard rel=openid.server/>
- Name: non-attr, has rel, short, space
- Link: rel=openid.server
- <html><head><link hubbard rel=openid.server />
- Name: misplaced slash has rel
- Link: rel=openid.server
- <html><head><link / rel=openid.server>
- Name: quoted rel
- Link: rel=openid.server
- <html><head><link rel="openid.server">
- Name: single-quoted rel
- Link: rel=openid.server
- <html><head><link rel='openid.server'>
- Name: two links w/ rel
- Link: x=y
- Link: a=b
- <html><head><link x=y><link a=b>
- Name: non-entity
- Link: x=&y
- <html><head><link x=&y>
- Name: quoted non-entity
- Link: x=&y
- <html><head><link x="&y">
- Name: quoted entity
- Link: x=&
- <html><head><link x="&">
- Name: entity not processed
- Link: x=
- <html><head><link x="">
- Name: <
- Link: x=<
- <html><head><link x="<">
- Name: >
- Link: x=>
- <html><head><link x=">">
- Name: "
- Link: x="
- <html><head><link x=""">
- Name: &"
- Link: x=&"
- <html><head><link x="&"">
- Name: mixed entity and non-entity
- Link: x=&"…>
- <html><head><link x="&"…>">
- Name: mixed entity and non-entity (w/normal chars)
- Link: x=x&"…>x
- <html><head><link x="x&"…>x">
- Name: broken tags
- Link*: x=y
- <html><head><link x=y<>
- Name: missing close pointy
- Link: z=y
- <html><head><link x=y<link z=y />
- Name: missing attribute value
- Link: x=y y*=
- Link: x=y
- <html><head><link x=y y=><link x=y />
- Name: Missing close pointy (no following)
- Link*: x=y
- <html><head><link x=y
- Name: Should be quoted
- Link: x*=<
- <html><head><link x="<">
- Name: Should be quoted (2)
- Link: x*=>
- <html><head><link x=">">
- Name: Repeated attribute
- Link: x=y
- <html><head><link x=z x=y>
- Name: Repeated attribute (2)
- Link: x=y
- <html><head><link x=y x=y>
- Name: Two attributes
- Link: x=y y=z
- <html><head><link x=y y=z>
- Name: Well-formed link rel="openid.server"
- Link: rel=openid.server href=http://www.myopenid.com/server
- <html>
- <head>
- <link rel="openid.server"
- href="http://www.myopenid.com/server" />
- </head>
- </html>
- Name: Well-formed link rel="openid.server" and "openid.delegate"
- Link: rel=openid.server href=http://www.myopenid.com/server
- Link: rel=openid.delegate href=http://example.myopenid.com/
- <html><head><link rel="openid.server"
- href="http://www.myopenid.com/server" />
- <link rel="openid.delegate" href="http://example.myopenid.com/" />
- </head></html>
- Name: from brian's livejournal page
- Link: rel=stylesheet href=http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711 type=text/css
- Link: rel=openid.server href=http://www.livejournal.com/openid/server.bml
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <link rel="stylesheet"
- href="http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711"
- type="text/css" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="foaf:maker"
- content="foaf:mbox_sha1sum '12f8abdacb5b1a806711e23249da592c0d316260'" />
- <meta name="robots" content="noindex, nofollow, noarchive" />
- <meta name="googlebot" content="nosnippet" />
- <link rel="openid.server"
- href="http://www.livejournal.com/openid/server.bml" />
- <title>Brian</title>
- </head>
- Name: non-ascii (Latin-1 or UTF8)
- Link: x=®
- <html><head><link x="®">
|