W3C home > Mailing lists > Public > www-validator-cvs@w3.org > January 2008

2008/link-testsuite base-1.html,NONE,1.1 base-2.php,NONE,1.1 base-3.php,NONE,1.1 base-4.html,NONE,1.1

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 28 Jan 2008 02:13:40 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1JJJVE-00073M-Is@lionel-hutz.w3.org>

Update of /sources/public/2008/link-testsuite
In directory hutz:/tmp/cvs-serv27093

Added Files:
	base-1.html base-2.php base-3.php base-4.html 
Log Message:
test cases for base href and content-location

--- NEW FILE: base-1.html ---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Link Checker Test - base-1</title>
	<meta name="author" content="olivier Thereaux">
	<base href="http://www.w3.org/QA/2008/01/">
</head>
<body>
<div id="test">
    <p> <span id="test-id">base-1</span>: 
        test for base URI with BASE href element. The document has a relative link. 
        HREF of the link should be calculated with the BASE URI considered.
    </p>
    <p id="expected" class="200 OK">EXPECTED: 
        relative link goes 200 if OK - link checker finds no error. If the link checker is not
        respecting the BASE element, it will find a 404 Not Found when following the link.
    </p>
</div>
<p><a href="are_you_mobileok.html">Are You MobileOk?</a></p>
</body>
</html>

--- NEW FILE: base-4.html ---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Link Checker Test - base-1</title>
	<meta name="author" content="olivier Thereaux">
	<base href="./trap/">
</head>
<body>
    <p>This document has a bogus BASE href value. Per the spec:
        <q cite="http://www.w3.org/TR/html401/struct/links.html#h-12.4">This attribute specifies an <strong>absolute URI</strong> that acts as the base URI for resolving relative URIs.</q></p>
        
    <p><a href="http.php?code=403">this should return a 200 OK</a> if the UA has some error recovery but the checker SHOULD return a 400 malformed URL</p>
</body>
</html>

--- NEW FILE: base-2.php ---
<?php header("Content-Location: http://www.w3.org/QA/2008/01/");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Link Checker Test - base-2</title>
	<meta name="author" content="olivier Thereaux">
</head>
<body>
<div id="test">
    <p> <span id="test-id">base-2</span>: 
        test for base URI with Content-Location HTTP Header. The document has a relative link. 
        HREF of the link should be calculated with the BASE URI considered.
    </p>
    <p id="expected" class="200 OK">EXPECTED: 
        relative link goes 200 if OK - link checker finds no error. If the link checker is not
        respecting the Content-Location HTTP Header, it will find a 404 Not Found when following the link.
    </p>
</div>
<p><a href="are_you_mobileok.html">Are You MobileOk?</a></p>
</body>
</html>

--- NEW FILE: base-3.php ---
<?php header("Content-Location: http://www.w3.org/QA/Tools/");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Link Checker Test - base-3</title>
	<meta name="author" content="olivier Thereaux">
	<base href="http://qa-dev.w3.org/link-testsuite/trap/">
</head>
<body>
<div id="test">
    <p> <span id="test-id">base-3</span>: 
        test for base URI with Content-Location HTTP Header. The document has a relative link. 
        HREF of the link should be calculated with the BASE URI considered.
    </p>
    <p id="expected" class="200 OK">EXPECTED: 
        200 OK. The BASE href has precedence over the other mechanisms.
        If the Content-Location is followed, the link checker would find a 404. This is incorrect.
        If the current URI of the document is taken as a base, 
        the link checker would find a 403. This is incorrect.
    </p>
</div>
<p><a href="http.php?code=403">this should return a 200 OK</a></p>
</body>
</html>
Received on Monday, 28 January 2008 02:13:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:00 GMT