Merge pull request #5247 from Rob--W/wiki-test-link-gen
Fix links to wiki subsections and remove TextDecoder feature tests
This commit is contained in:
		
						commit
						8206894d24
					
				| @ -54,7 +54,7 @@ limitations under the License. | ||||
|     <div id="plusfontusage" style="font-family: plus; visibility: hidden;">`</div> | ||||
| 
 | ||||
|     <script> | ||||
|     var wikiPageBase = 'https://github.com/mozilla/pdf.js/wiki/Required-Browser-Features#wiki-'; | ||||
|     var wikiPageBase = 'https://github.com/mozilla/pdf.js/wiki/Required-Browser-Features#user-content-'; | ||||
|     var output = document.getElementById('output'); | ||||
|     // for some browser textContent is absent using innerHTML :/ | ||||
|     for (var i = 0; i < tests.length; i++) { | ||||
|  | ||||
| @ -484,18 +484,6 @@ var tests = [ | ||||
|     impact: 'Important', | ||||
|     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', | ||||
| @ -604,46 +592,6 @@ var tests = [ | ||||
|     impact: 'Important', | ||||
|     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', | ||||
|  | ||||
| @ -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; | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user