61c6ab3fb0
functional tests, unless a whole lot of mock objects are introduced, which isn't entirely out of the question). Uses JsUnit, which is included in this commit.
38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>Test loading a local HTML Document</title>
|
|
<link rel="stylesheet" type="text/css" href="../css/jsUnitStyle.css">
|
|
<script language="JavaScript" type="text/javascript" src="../app/jsUnitCore.js"></script>
|
|
<script language="JavaScript" type="text/javascript">
|
|
|
|
function setUpPage() {
|
|
inform('setUpPage()');
|
|
setUpPageStatus = 'running';
|
|
// test delayed setUpPage completion
|
|
setTimeout('setUpPageComplete()', 30);
|
|
}
|
|
|
|
function setUpPageComplete() {
|
|
if (setUpPageStatus == 'running')
|
|
setUpPageStatus = 'complete';
|
|
inform('setUpPageComplete()', setUpPageStatus);
|
|
}
|
|
|
|
function testDocumentGetElementsByTagName() {
|
|
assertEquals(setUpPageStatus, 'complete');
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>JsUnit Asynchronous setUpPages</h1>
|
|
|
|
<p>This page tests asynchronoush pre tests. To see them, take a look at the source.</p>
|
|
<iframe name="documentBuffer"></iframe>
|
|
</body>
|
|
</html>
|