Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Prefix test-output id and ignore that in noglobals check. Fixes #212
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 4 May 2012 09:47:17 +0000 (11:47 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 4 May 2012 09:47:17 +0000 (11:47 +0200)
qunit/qunit.js

index 74702bb..20ae9ff 100644 (file)
@@ -50,7 +50,7 @@ Test.prototype = {
                        li = document.createElement( "li" );
                        li.appendChild( b );
                        li.className = "running";
-                       li.id = this.id = "test-output" + testId++;
+                       li.id = this.id = "qunit-test-output" + testId++;
 
                        tests.appendChild( li );
                }
@@ -1073,7 +1073,8 @@ function saveGlobal() {
 
        if ( config.noglobals ) {
                for ( var key in window ) {
-                       if ( !hasOwn.call( window, key ) ) {
+                       // in Opera sometimes DOM element ids show up here, ignore them
+                       if ( !hasOwn.call( window, key ) || /^qunit-test-output/.test( key ) ) {
                                continue;
                        }
                        config.pollution.push( key );

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