From 60147ca0164e3d810b8a9bf46981c3d9cc569efc Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Wed, 11 May 2011 13:31:40 +0200 Subject: [PATCH] Modify document.title when suite is done to show success/failure in tab, allows you to see the overall result without seeing the tab content. --- qunit/qunit.js | 5 +++++ test/index.html | 1 + 2 files changed, 6 insertions(+) diff --git a/qunit/qunit.js b/qunit/qunit.js index 931366d..135e809 100644 --- a/qunit/qunit.js +++ b/qunit/qunit.js @@ -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, diff --git a/test/index.html b/test/index.html index 7713ac8..64ccfcc 100644 --- a/test/index.html +++ b/test/index.html @@ -1,6 +1,7 @@ + QUnit Test Suite -- 2.11.0