mochi-single.html (1974B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset='utf-8'/> 5 <title> 6 WebGL Conformance Test Suite Single Test Wrapper 7 </title> 8 <link rel='stylesheet' type='text/css' href='iframe-passthrough.css'/> 9 </head> 10 <body> 11 <iframe id='test-frame'></iframe> 12 <script> 13 'use strict'; 14 15 var frameElem = document.getElementById('test-frame'); 16 17 //////////////////////////////////////////////////////////////////////// 18 19 window.webglTestHarness = { 20 reportResults(pathname, success, message) { 21 if (parent) { 22 parent.ok(success, message); 23 } else { 24 console.log('ok(' + success + ', \'' + message + '\')'); 25 } 26 }, 27 28 notifyFinished(testPath) { 29 console.error('webglTestHarness.notifyFinished'); 30 if (parent) { 31 parent.SimpleTest.finish(); 32 } else { 33 console.log('SimpleTest.finish()'); 34 } 35 }, 36 }; 37 38 if (parent) { 39 parent.SimpleTest.waitForExplicitFinish(); 40 parent.SimpleTest.requestFlakyTimeout('untriaged'); 41 42 try { 43 let timeoutLengthMultiplier; 44 if (navigator.appVersion.includes('Android')) { 45 // From layout/tools/reftest/reftest.js: 46 var version = SpecialPowers.Services.sysinfo.getProperty('version'); 47 var kAndroidVersion2_3 = 9; 48 if (version == kAndroidVersion2_3) { 49 timeoutLengthMultiplier = 2.0; 50 } 51 } else if (SpecialPowers.Services.sysinfo.getProperty('isMinGW')) { 52 timeoutLengthMultiplier = 2.0; 53 } 54 if (timeoutLengthMultiplier) { 55 parent.SimpleTest.requestLongerTimeout(timeoutLengthMultiplier); 56 } 57 } catch (e) { 58 console.error('Warning: No SpecialPowers.'); 59 } 60 }; 61 62 //////////////////////////////////////////////////////////////////////// 63 64 function runTest() { 65 var testPath = location.search.substr(1); 66 console.log('testPath: ' + testPath); 67 frameElem.src = testPath; 68 } 69 70 SpecialPowers.pushPrefEnv({"set": [ 71 ['media.rvfc.enabled', true], 72 ['webgl.force-enabled', true], 73 ['webgl.enable-draft-extensions', true], 74 ]}, runTest); 75 76 </script> 77 </body> 78 </html>