big big big update

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-10-09 21:30:27 +02:00
parent fb30fe966e
commit 3b4f1e024f
96 changed files with 37252 additions and 431 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
# Locations
$dir = dirname(__FILE__);
$out = "$dir/../tests";
# Base URL
$base_url = '/';
$tests_url = $base_url.'tests';
# Data
$browsers = array(
'html4+html5',
'html5'
);
$adapters = array(
'jquery',
'mootools',
'native',
'right',
'zepto'
);
+45
View File
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<title>History.js Test Suite</title>
<style type="text/css">
body,html,iframe {
padding:0;
margin:0;
outline:none;
border:none;
}
.browser {
padding-top:1em;
}
.adapter {
padding-top:1em;
}
</style>
</head>
<body>
<h1>History.js Test Suite</h1>
<p>HTML5 Browsers must pass the HTML4+HTML5 tests</p>
<p>HTML4 Browsers must pass the HTML4 tests and should fail the HTML5 tests</p>
<?php
foreach ( $browsers as $browser ) :
echo '<div class="browser">';
foreach ( $adapters as $adapter ) :
echo '<div class="adapter">';
# Url
$url = "${browser}.${adapter}.html";
# Title
$Browser = ucwords($browser);
$Adapter = ucwords($adapter);
$title = "History.js ${Browser} ${Adapter} Test Suite";
# Render
?><a href="<?=$url?>"><?=$title?></a><?php
echo '</div>';
endforeach;
echo '</div>';
endforeach;
?>
</body>
</html>
+51
View File
@@ -0,0 +1,51 @@
<?php
# Url
$url = "${browser}.${adapter}.html";
# Titles
$Browser = strtoupper($browser);
$Adapter = ucwords($adapter);
$title = "History.js ${Browser} ${Adapter} Test Suite";
?><!DOCTYPE html>
<html debug="true">
<head>
<meta http-equiv="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT" />
<meta http-equiv="PRAGMA" CONTENT="NO-CACHE" />
<meta http-equiv="CACHE-CONTROL" CONTENT="NO-CACHE" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><?=$title?></title>
<!-- Check -->
<script>
var href = window.document.location.href,
test_url = href.replace(/(history\.js\/tests\/[^\/\?\#]+).*/,'$1');
if ( test_url !== href ) {
window.document.location.href = test_url;
}
</script>
<!-- Framework -->
<script src="../vendor/<?=$adapter?>.js"></script>
<!-- QUnit -->
<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css" type="text/css" media="screen">
<script src="../vendor/qunit/qunit/qunit.js"></script>
</head>
<body>
<!-- Elements -->
<h1 id="qunit-header"><?=$title?></h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup</div>
<button onclick="history.back()">back</button><button onclick="history.forward()">forward</button>
<textarea id="log" style="width:100%;height:400px"></textarea>
<!-- History.js -->
<script src="../scripts/bundled/<?=$browser?>/<?=$adapter?>.history.js"></script>
<!-- Tests -->
<script src="tests.js"></script>
</body>
</html>
+23
View File
@@ -0,0 +1,23 @@
<?php
# Header
require_once(dirname(__FILE__).'/_header.php');
# Index
ob_start();
require($dir.'/all.php');
$contents = ob_get_contents();
ob_end_clean();
file_put_contents($out.'/index.html', $contents);
# Each
foreach ( $browsers as $browser )
foreach ( $adapters as $adapter ) {
ob_start();
require($dir.'/each.php');
$contents = ob_get_contents();
ob_end_clean();
file_put_contents($out."/${url}", $contents);
}
# Done
?><html><body><a href="../tests">Tests</a></body></html>