aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/vendor/benchmark/test/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/vendor/benchmark/test/index.html')
-rw-r--r--web/src/vendor/benchmark/test/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/web/src/vendor/benchmark/test/index.html b/web/src/vendor/benchmark/test/index.html
new file mode 100644
index 00000000..9762fb69
--- /dev/null
+++ b/web/src/vendor/benchmark/test/index.html
@@ -0,0 +1,85 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Benchmark.js Test Suite</title>
+ <link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
+ <style>
+ applet {
+ position: absolute;
+ left: -9999em;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="qunit"></div>
+ <script src="../benchmark.js"></script>
+ <script src="../vendor/platform.js/platform.js"></script>
+ <script>
+ (function() {
+ var hasOwnProperty = function hasOwnProperty(key) {
+ var parent = (this.constructor || Object).prototype;
+ return key in this && !(key in parent && this[key] === parent[key]);
+ };
+ if (typeof {}.hasOwnProperty != 'function') {
+ // redefine for Safari 2, else use the less accurate fallback for others
+ if ({}.__proto__ == Object.prototype) {
+ hasOwnProperty = function hasOwnProperty(key) {
+ var result;
+ this.__proto__ = [this.__proto__, this.__proto__ = null, result = key in this][0];
+ return result;
+ };
+ }
+ Object.prototype.hasOwnProperty = hasOwnProperty;
+ }
+ }());
+
+ // load the nanosecond timer
+ if (!/[?&]nojava=true(?:&|$)/.test(location.search)) {
+ document.write('<applet code="nano" archive="../nano.jar"></applet>');
+ }
+
+ // avoid syntax errors for `QUnit.throws` in older Firefoxes
+ document.write(platform.name == 'Firefox' && /^1\b/.test(platform.version)
+ ? '<script src="../vendor/qunit/qunit/qunit-1.8.0.js"><\/script>'
+ : '<script src="../vendor/qunit/qunit/qunit.js"><\/script>'
+ );
+ </script>
+ <script>
+ // load test.js if not using require.js
+ document.write(/[?&]norequire=true(?:&|$)/.test(location.search)
+ ? '<script src="test.js"><\/script>'
+ : '<script src="../vendor/requirejs/require.js"><\/script>'
+ );
+ </script>
+ <script>
+ // load Benchmark as a module
+ var Benchmark2;
+
+ window.require && require({
+ 'baseUrl': '../vendor/requirejs/',
+ 'urlArgs': 't=' + (+new Date),
+ 'paths': {
+ 'benchmark': '../../benchmark',
+ 'platform': '../platform.js/platform'
+ }
+ },
+ ['benchmark', 'platform'], function(Benchmark, platform) {
+ Benchmark2 = Benchmark;
+ Benchmark2.platform = platform;
+ require(['test.js']);
+ });
+
+ // set a more readable browser name
+ window.onload = function() {
+ var timeoutId = setInterval(function() {
+ var ua = document.getElementById('qunit-userAgent');
+ if (ua) {
+ ua.innerHTML = platform;
+ clearInterval(timeoutId);
+ }
+ }, 15);
+ };
+ </script>
+ </body>
+</html>