diff --git a/jquery.pjax.falsandtru/jquery.pjax-tests.ts b/jquery.pjax.falsandtru/jquery.pjax-tests.ts index fd8cbaecd..18eae623c 100644 --- a/jquery.pjax.falsandtru/jquery.pjax-tests.ts +++ b/jquery.pjax.falsandtru/jquery.pjax-tests.ts @@ -33,64 +33,3 @@ function test_pjax_event() { $('div.loading').fadeOut(500); }); } - -function test_pjax_progressbar() { - $('body').append('
'); - $.pjax({ - area: 'div.pjax', - callbacks: { - before: function () { - $('div.loading').children().width(''); - $('div.loading').fadeIn(0); - }, - ajax: { - xhr: function () { - var xhr = jQuery.ajaxSettings.xhr(); - - $('div.loading').children().width('5%'); - if (xhr instanceof Object && 'onprogress' in xhr) { - xhr.addEventListener('progress', function (event) { - var percentage = event.total ? event.loaded / event.total : 0.4; - percentage = percentage * 90 + 5; - $('div.loading').children().width(percentage + '%'); - }, false); - xhr.addEventListener('load', function (event) { - $('div.loading').children().width('95%'); - }, false); - xhr.addEventListener('error', function (event) { - $('div.loading').children().css('background-color', '#00f'); - }, false); - } - return xhr; - } - }, - update: { - content: { - after: function () { - $('div.loading').children().width('96.25%'); - } - }, - css: { - after: function () { - $('div.loading').children().width('97.5%'); - } - }, - script: { - after: function () { - $('div.loading').children().width('98.75%'); - } - }, - render: { - after: function () { - $('div.loading').children().width('100%'); - $('div.loading').fadeOut(50); - } - } - } - }, - ajax: { timeout: 3000 }, - wait: 1000 - }); -} \ No newline at end of file