| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" | 3 <script type="text/javascript" |
| 4 src="../../../../third_party/webgl_conformance/resources/webgl-test-harn
ess.js"> | 4 src="../../../../third_party/webgl_conformance/resources/webgl-test-harn
ess.js"> |
| 5 </script> | 5 </script> |
| 6 <script> | 6 <script> |
| 7 // We parse the test list offline and run the harness multiple times with each | 7 // We parse the test list offline and run the harness multiple times with each |
| 8 // test. Therefore, the version and options do not matter for the browsertests. | 8 // test. Therefore, the version and options do not matter for the browsertests. |
| 9 // However, we still need to pass in a valid options for the harness to run. | 9 // However, we still need to pass in a valid options for the harness to run. |
| 10 var CONFORMANCE_TEST_VERSION = "1.0.1 (beta)"; | 10 var CONFORMANCE_TEST_VERSION = "1.0.1 (beta)"; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 var ext = gl.getExtension("WEBGL_debug_renderer_info"); | 44 var ext = gl.getExtension("WEBGL_debug_renderer_info"); |
| 45 if (ext) { | 45 if (ext) { |
| 46 messages.push("GL_VENDOR: " + | 46 messages.push("GL_VENDOR: " + |
| 47 gl.getParameter(ext.UNMASKED_VENDOR_WEBGL)); | 47 gl.getParameter(ext.UNMASKED_VENDOR_WEBGL)); |
| 48 messages.push("GL_RENDERER: " + | 48 messages.push("GL_RENDERER: " + |
| 49 gl.getParameter(ext.UNMASKED_RENDERER_WEBGL)); | 49 gl.getParameter(ext.UNMASKED_RENDERER_WEBGL)); |
| 50 } | 50 } |
| 51 } else { | 51 } else { |
| 52 messages.push("SUCCESS"); | 52 messages.push("SUCCESS"); |
| 53 } | 53 } |
| 54 domAutomationController.setAutomationId(1); | |
| 55 domAutomationController.send(messages.join("\n")); | 54 domAutomationController.send(messages.join("\n")); |
| 56 break; | 55 break; |
| 57 } | 56 } |
| 58 } | 57 } |
| 59 | 58 |
| 60 function create3DContext() { | 59 function create3DContext() { |
| 61 var canvas = document.createElement("canvas"); | 60 var canvas = document.createElement("canvas"); |
| 62 var context = null; | 61 var context = null; |
| 63 try { | 62 try { |
| 64 context = canvas.getContext("webgl"); | 63 context = canvas.getContext("webgl"); |
| 65 } catch(e) { | 64 } catch(e) { |
| 66 } | 65 } |
| 67 if (!context) { | 66 if (!context) { |
| 68 try { | 67 try { |
| 69 context = canvas.getContext("experimental-webgl"); | 68 context = canvas.getContext("experimental-webgl"); |
| 70 } catch(e) { | 69 } catch(e) { |
| 71 } | 70 } |
| 72 } | 71 } |
| 73 return context; | 72 return context; |
| 74 } | 73 } |
| 75 | 74 |
| 76 // Assert the WebGL context exists. | 75 // Assert the WebGL context exists. |
| 77 gl = create3DContext(); | 76 gl = create3DContext(); |
| 78 if (!gl) { | 77 if (!gl) { |
| 79 domAutomationController.setAutomationId(1); | |
| 80 domAutomationController.send("FAILURE: unable to fetch WebGL context"); | 78 domAutomationController.send("FAILURE: unable to fetch WebGL context"); |
| 81 return; | 79 return; |
| 82 } | 80 } |
| 83 | 81 |
| 84 var iframe = document.getElementById("testframe"); | 82 var iframe = document.getElementById("testframe"); |
| 85 var testHarness = new WebGLTestHarnessModule.TestHarness( | 83 var testHarness = new WebGLTestHarnessModule.TestHarness( |
| 86 iframe, | 84 iframe, |
| 87 BASE_URL + start_url, | 85 BASE_URL + start_url, |
| 88 report, | 86 report, |
| 89 OPTIONS); | 87 OPTIONS); |
| 90 | 88 |
| 91 window.webglTestHarness = testHarness; | 89 window.webglTestHarness = testHarness; |
| 92 window.webglTestHarness.runTests(); | 90 window.webglTestHarness.runTests(); |
| 93 } | 91 } |
| 94 </script> | 92 </script> |
| 95 </head> | 93 </head> |
| 96 <body> | 94 <body> |
| 97 <iframe id="testframe" scrolling="yes" width="100%" height="100%"></iframe> | 95 <iframe id="testframe" scrolling="yes" width="100%" height="100%"></iframe> |
| 98 </body> | 96 </body> |
| 99 </html> | 97 </html> |
| OLD | NEW |