index.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>BabylonJS - Build validation page</title>
  5. <link href="index.css" rel="stylesheet" />
  6. <script src="../../Tools/DevLoader/BabylonLoader.js"></script>
  7. </head>
  8. <body>
  9. <script>
  10. BABYLONDEVTOOLS.Loader.require('validation.js')
  11. .load(function() {
  12. // Loading tests
  13. var xhr = new XMLHttpRequest();
  14. xhr.open("GET", "config.json", true);
  15. xhr.addEventListener("load", function () {
  16. if (xhr.status === 200) {
  17. config = JSON.parse(xhr.responseText);
  18. // Run tests
  19. var index = 0;
  20. if (window.location.search) {
  21. justOnce = true;
  22. var title = window.location.search.replace("?", "").replace(/%20/g, " ");
  23. for (var index = 0; index < config.tests.length; index++) {
  24. if (config.tests[index].title === title) {
  25. break;
  26. }
  27. }
  28. }
  29. var recursiveRunTest = function(i) {
  30. runTest(i, function() {
  31. i++;
  32. if (justOnce || i >= config.tests.length) {
  33. return;
  34. }
  35. recursiveRunTest(i);
  36. });
  37. }
  38. recursiveRunTest(index);
  39. }
  40. }, false);
  41. xhr.send();
  42. });
  43. </script>
  44. </body>
  45. </html>