web/test/jstests/test_ajax.js
branchstable
changeset 6214 e03808843325
parent 5950 f84dba9b8eca
child 6215 759cf097f5aa
--- a/web/test/jstests/test_ajax.js	Mon Sep 13 10:00:05 2010 +0200
+++ b/web/test/jstests/test_ajax.js	Mon Sep 13 09:56:10 2010 +0200
@@ -3,7 +3,12 @@
     module("ajax", {
         setup: function() {
           this.scriptsLength = $('head script[src]').length-1;
-	  this.cssLength = $('head link[rel=stylesheet]').length-1;
+          this.cssLength = $('head link[rel=stylesheet]').length-1;
+          // re-initialize cw loaded cache so that each tests run in a
+          // clean environment, have a lookt at _loadAjaxHtmlHead implementation
+          // in cubicweb.ajax.js for more information.
+          cw.loaded_src = [];
+          cw.loaded_href = [];
         },
         teardown: function() {
           $('head script[src]:gt(' + this.scriptsLength + ')').remove();