From b15d9492ff5c2e54bc5aee9c7a03d338fed54f58 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Fri, 27 May 2011 18:51:20 -0400 Subject: [PATCH] Bug 598165 - Remove flaky Prototype tests testUpdaterWithInsertion and testResponders; r=ehsan --- .../ajax/prototype/test/unit/ajax_test.js | 56 ------------------- 1 file changed, 56 deletions(-) diff --git a/dom/tests/mochitest/ajax/prototype/test/unit/ajax_test.js b/dom/tests/mochitest/ajax/prototype/test/unit/ajax_test.js index d21778711d90..fa393403e359 100644 --- a/dom/tests/mochitest/ajax/prototype/test/unit/ajax_test.js +++ b/dom/tests/mochitest/ajax/prototype/test/unit/ajax_test.js @@ -59,25 +59,6 @@ new Test.Unit.Runner({ }); }, - testUpdaterWithInsertion: function() { - $('content').update(); - new Ajax.Updater("content", "../fixtures/content.html", { method:'get', insertion: Insertion.Top }); - this.wait(1000, function() { - // bug 452706 this.assertEqual(sentence, $("content").innerHTML.strip().toLowerCase()); - $('content').update(); - new Ajax.Updater("content", "../fixtures/content.html", { method:'get', insertion: 'bottom' }); - this.wait(1000, function() { - this.assertEqual(sentence, $("content").innerHTML.strip().toLowerCase()); - - $('content').update(); - new Ajax.Updater("content", "../fixtures/content.html", { method:'get', insertion: 'after' }); - this.wait(1000, function() { - this.assertEqual('five dozen', $("content").next().innerHTML.strip().toLowerCase()); - }); - }); - }); - }, - testUpdaterOptions: function() { var options = { method: 'get', @@ -90,43 +71,6 @@ new Test.Unit.Runner({ this.assertIdentical(Prototype.emptyFunction, options.onComplete); }, - testResponders: function(){ - // check for internal responder - this.assertEqual(1, Ajax.Responders.responders.length); - - var dummyResponder = { - onComplete: function(req) { /* dummy */ } - }; - - Ajax.Responders.register(dummyResponder); - this.assertEqual(2, Ajax.Responders.responders.length); - - // don't add twice - Ajax.Responders.register(dummyResponder); - this.assertEqual(2, Ajax.Responders.responders.length); - - Ajax.Responders.unregister(dummyResponder); - this.assertEqual(1, Ajax.Responders.responders.length); - - var responder = { - onCreate: function(req){ responderCounter++ }, - onLoading: function(req){ responderCounter++ }, - onComplete: function(req){ responderCounter++ } - }; - Ajax.Responders.register(responder); - - this.assertEqual(0, responderCounter); - this.assertEqual(0, Ajax.activeRequestCount); - new Ajax.Request("../fixtures/content.html", { method:'get', parameters:"pet=monkey" }); - this.assertEqual(1, responderCounter); - this.assertEqual(1, Ajax.activeRequestCount); - - this.wait(1000,function() { - this.assertEqual(3, responderCounter); - this.assertEqual(0, Ajax.activeRequestCount); - }); - }, - testEvalResponseShouldBeCalledBeforeOnComplete: function() { if (this.isRunningFromRake) { this.assertEqual("", $("content").innerHTML);