Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/mocha-3.1.0/test/browser/ui.html')
-rw-r--r--tests/lib/mocha-3.1.0/test/browser/ui.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.0/test/browser/ui.html b/tests/lib/mocha-3.1.0/test/browser/ui.html
new file mode 100644
index 0000000000..071c7798a0
--- /dev/null
+++ b/tests/lib/mocha-3.1.0/test/browser/ui.html
@@ -0,0 +1,46 @@
+<html>
+ <head>
+ <title>Mocha</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="../../mocha.css" />
+ <script src="../../mocha.js"></script>
+ <script>mocha.setup('bdd')</script>
+ <script>
+ function assert(expr, msg) {
+ if (!expr) throw new Error(msg || 'failed');
+ }
+ </script>
+ <script src="ui.js"></script>
+ </head>
+ <body>
+ <div id="mocha"></div>
+ <script>
+ (function(window) {
+ var location = window.location;
+ mocha.checkLeaks();
+ var runner = mocha.run();
+ var count = 0;
+ setTimeout(run, 1000);
+
+ function run() {
+ var regex = [
+ '', // All
+ '%5C%24%5C.jQuery', // $.jQuery
+ '%5C%24%5C.jQuery%20%5C.on%5C(%5C)', // $.jQuery .on()
+ ]
+ , qs = location.search.replace('?grep=', '')
+ , re = ~qs.indexOf('%') ? qs : decodeURIComponent(qs)
+ , grep = regex[regex.indexOf(re) + 1]
+ , anchors = document.getElementsByTagName('a');
+
+ // Locate first 'a' element w/ matching grep param; click it
+ for (var i = 0; i < anchors.length; i++) {
+ if (anchors[i].href && anchors[i].href.indexOf(grep) > -1)
+ return void anchors[i].click();
+ }
+ }
+ })(window);
+ </script>
+ </body>
+</html>