each.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. # Url
  3. $url = "${browser}.${adapter}.html";
  4. # Titles
  5. $Browser = strtoupper($browser);
  6. $Adapter = ucwords($adapter);
  7. $title = "History.js ${Browser} ${Adapter} Test Suite";
  8. ?><!DOCTYPE html>
  9. <html debug="true">
  10. <head>
  11. <meta http-equiv="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT" />
  12. <meta http-equiv="PRAGMA" CONTENT="NO-CACHE" />
  13. <meta http-equiv="CACHE-CONTROL" CONTENT="NO-CACHE" />
  14. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  15. <title><?=$title?></title>
  16. <!-- Check -->
  17. <script>
  18. var href = window.document.location.href,
  19. test_url = href.replace(/(history\.js\/tests\/[^\/\?\#]+).*/,'$1');
  20. if ( test_url !== href ) {
  21. window.document.location.href = test_url;
  22. }
  23. </script>
  24. <!-- Framework -->
  25. <script src="../vendor/<?=$adapter?>.js"></script>
  26. <!-- QUnit -->
  27. <link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css" type="text/css" media="screen">
  28. <script src="../vendor/qunit/qunit/qunit.js"></script>
  29. </head>
  30. <body>
  31. <!-- Elements -->
  32. <h1 id="qunit-header"><?=$title?></h1>
  33. <h2 id="qunit-banner"></h2>
  34. <div id="qunit-testrunner-toolbar"></div>
  35. <h2 id="qunit-userAgent"></h2>
  36. <ol id="qunit-tests"></ol>
  37. <div id="qunit-fixture">test markup</div>
  38. <button onclick="history.back()">back</button><button onclick="history.forward()">forward</button>
  39. <textarea id="log" style="width:100%;height:400px"></textarea>
  40. <!-- History.js -->
  41. <script src="../scripts/bundled/<?=$browser?>/<?=$adapter?>.history.js"></script>
  42. <!-- Tests -->
  43. <script src="tests.js"></script>
  44. </body>
  45. </html>