|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <!-- |
3 | | - Copyright (C) 2008 Johan Euphrosine <[email protected]> |
4 | | - Copyright (C) 2008 Loic Dachary <[email protected]> |
5 | | - Copyright (C) 2011 Eric Wendelin <[email protected]> |
6 | | -
|
7 | | - This program is free software: you can redistribute it and/or modify |
8 | | - it under the terms of the GNU General Public License as published by |
9 | | - the Free Software Foundation, either version 3 of the License, or |
10 | | - (at your option) any later version. |
11 | | -
|
12 | | - This program is distributed in the hope that it will be useful, |
13 | | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | | - GNU General Public License for more details. |
16 | | -
|
17 | | - You should have received a copy of the GNU General Public License |
18 | | - along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 3 | + Copyright (C) 2008 Johan Euphrosine <[email protected]> |
| 4 | + Copyright (C) 2008 Loic Dachary <[email protected]> |
| 5 | + Copyright (C) 2011 Eric Wendelin <[email protected]> |
| 6 | +
|
| 7 | + This program is free software: you can redistribute it and/or modify |
| 8 | + it under the terms of the GNU General Public License as published by |
| 9 | + the Free Software Foundation, either version 3 of the License, or |
| 10 | + (at your option) any later version. |
| 11 | +
|
| 12 | + This program is distributed in the hope that it will be useful, |
| 13 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | + GNU General Public License for more details. |
| 16 | +
|
| 17 | + You should have received a copy of the GNU General Public License |
| 18 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 | --> |
20 | 20 | <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en' dir='ltr' id='html'> |
21 | 21 | <head> |
|
27 | 27 | <script type='text/javascript' src='../stacktrace.js'></script> |
28 | 28 | <script type='text/javascript' src='CapturedExceptions.js'></script> |
29 | 29 | <script type='text/javascript' src='TestStacktrace.js'></script> |
| 30 | + <script> |
| 31 | + var _bTestResults = {}; |
| 32 | + |
| 33 | + // Add URL option in QUnit to toggle publishing results to BrowserScope.org |
| 34 | + QUnit.config.urlConfig.push("publish"); |
| 35 | + QUnit.config.testTimeout = 1000; // Timeout for async tests |
| 36 | + |
| 37 | + // Build-up the test results beacon for BrowserScope.org |
| 38 | + QUnit.testDone = function(test) { |
| 39 | + // make sure all assertions passed successfully |
| 40 | + if (!test.failed && test.total === test.passed) { |
| 41 | + _bTestResults[test.name] = 1; |
| 42 | + } else { |
| 43 | + _bTestResults[test.name] = 0; |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + // If the user agreed to publish results to BrowserScope.org, go for it! |
| 48 | + QUnit.done = function() { |
| 49 | + if (QUnit.config.publish) { |
| 50 | + var testKey = 'agt1YS1wcm9maWxlcnINCxIEVGVzdBjr68MRDA'; |
| 51 | + var newScript = document.createElement('script'); |
| 52 | + var firstScript = document.getElementsByTagName('script')[0]; |
| 53 | + |
| 54 | + newScript.src = 'http://www.browserscope.org/user/beacon/' + testKey + "?callback=showResults"; |
| 55 | + firstScript.parentNode.insertBefore(newScript, firstScript); |
| 56 | + } |
| 57 | + } |
| 58 | + |
| 59 | + // Load the results widget from browserscope.org |
| 60 | + function showResults() { |
| 61 | + var script = document.createElement('script'); |
| 62 | + script.src = "http://www.browserscope.org/user/tests/table/agt1YS1wcm9maWxlcnINCxIEVGVzdBjr68MRDA?o=js"; |
| 63 | + document.body.appendChild(script); |
| 64 | + } |
| 65 | + </script> |
30 | 66 | </head> |
31 | 67 | <body> |
32 | 68 | <h1 id='qunit-header'>stacktrace.js Test Suite</h1> |
|
0 commit comments