[Pkg-javascript-commits] [pdf.js] 22/204: Remove TextDecoder feature tests
David Prévot
taffit at moszumanska.debian.org
Sat Oct 25 18:50:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit b57d35034c49c5abb10902122cdb0319e012fe98
Author: Rob Wu <rob at robwu.nl>
Date: Sat Aug 30 10:55:00 2014 +0200
Remove TextDecoder feature tests
TextDecoder is not required by PDF.js any more, and the wiki entry has been deleted as well:
https://github.com/mozilla/pdf.js/wiki/Required-Browser-Features/_compare/13ddaa98459236169c1d7969f00fa5610bf7e10f...09aac34e58549698930735bdd10685b9ee54a9ac
---
test/features/tests.js | 52 --------------------------------------------
test/features/worker-stub.js | 5 -----
2 files changed, 57 deletions(-)
diff --git a/test/features/tests.js b/test/features/tests.js
index 3c0b60c..af9d5b8 100644
--- a/test/features/tests.js
+++ b/test/features/tests.js
@@ -485,18 +485,6 @@ var tests = [
area: 'Core'
},
{
- id: 'TextDecoder',
- name: 'TextDecoder is present',
- run: function () {
- if (typeof TextDecoder != 'undefined')
- return { output: 'Success', emulated: '' };
- else
- return { output: 'Failed', emulated: 'No' };
- },
- impact: 'Critical',
- area: 'Core'
- },
- {
id: 'Worker',
name: 'Worker is present',
run: function () {
@@ -605,46 +593,6 @@ var tests = [
area: 'Core'
},
{
- id: 'Worker-TextDecoder',
- name: 'TextDecoder is present in web workers',
- run: function () {
- if (typeof Worker == 'undefined')
- return { output: 'Skipped', emulated: '' };
-
- var emulatable = typeof TextDecoder !== 'undefined';
- try {
- var worker = new Worker('worker-stub.js');
-
- var promise = new Promise();
- var timeout = setTimeout(function () {
- promise.resolve({ output: 'Failed',
- emulated: emulatable ? '?' : 'No' });
- }, 5000);
-
- worker.addEventListener('message', function (e) {
- var data = e.data;
- if (data.action === 'TextDecoder') {
- if (data.result) {
- promise.resolve({ output: 'Success', emulated: '' });
- } else {
- promise.resolve({ output: 'Failed',
- emulated: data.emulated ? 'Yes' : 'No' });
- }
- } else {
- promise.resolve({ output: 'Failed',
- emulated: emulatable ? 'Yes' : 'No' });
- }
- }, false);
- worker.postMessage({action: 'TextDecoder'});
- return promise;
- } catch (e) {
- return { output: 'Failed', emulated: emulatable ? 'Yes' : 'No' };
- }
- },
- impact: 'Important',
- area: 'Core'
- },
- {
id: 'Canvas Blend Mode',
name: 'Canvas supports extended blend modes',
run: function () {
diff --git a/test/features/worker-stub.js b/test/features/worker-stub.js
index 6dc01f9..2a1306e 100644
--- a/test/features/worker-stub.js
+++ b/test/features/worker-stub.js
@@ -35,11 +35,6 @@ onmessage = function (e) {
}
postMessage({action: 'xhr', result: responseExists});
break;
- case 'TextDecoder':
- postMessage({action: 'TextDecoder',
- result: typeof TextDecoder !== 'undefined',
- emulated: typeof FileReaderSync !== 'undefined'});
- break;
}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list