Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Modify document.title when suite is done to show success/failure in tab,
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 11 May 2011 11:31:40 +0000 (13:31 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 11 May 2011 19:23:09 +0000 (21:23 +0200)
allows you to see the overall result without seeing the tab content.

qunit/qunit.js
test/index.html

index 931366d..135e809 100644 (file)
@@ -778,6 +778,11 @@ function done() {
                id( "qunit-testresult" ).innerHTML = html;
        }
 
+       if ( typeof document !== "undefined" && document.title ) {
+               // TODO what are the unicode codes for these? as-is fails if qunit.js isn't served with the right mimetype/charset
+               document.title = (config.stats.bad ? "✖" : "✔") + " " + document.title;
+       }
+
        QUnit.done( {
                failed: config.stats.bad,
                passed: passed, 
index 7713ac8..64ccfcc 100644 (file)
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+       <meta charset="UTF-8" />
        <title>QUnit Test Suite</title>
        <link rel="stylesheet" href="../qunit/qunit.css" type="text/css" media="screen">
        <script type="text/javascript" src="../qunit/qunit.js"></script>

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf