Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-error-response.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-error-response.html b/third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-error-response.html |
| index e866a237d28b4586468b4b98cd73958ea3459593..421eb428f9f4872bcf9a072d2e585a3ff61d81ad 100644 |
| --- a/third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-error-response.html |
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-error-response.html |
| @@ -22,18 +22,32 @@ function initTest() { |
| function onContextCreationError(e) { |
| var splitStatus = e.statusMessage.split(","); |
| - var stringLocator = 1; |
| - var status = true; |
| - // Start iterating from 1 as , the initial message has no data. |
| + var error = ""; |
| for (var i = 1; i < splitStatus.length; i++) { |
| var gpuInfoStr = splitStatus[i].split(" = "); |
| - if (gpuInfoStr[stringLocator] == "") |
| - status = false; |
| + var key = gpuInfoStr[0].trim(); |
| + var value = gpuInfoStr[1]; |
| + if (key == "DEVICE" && (value == "0x0000" || value == "")) |
| + error = error + "DeviceID is null."; |
| + if (key == "VENDOR" && (value == "0x0000" || value == "")) |
| + error = error + "VendorID is null."; |
| + if ((key == "GL_VENDOR" || |
| + key == "GL_RENDERER" || |
| + key == "GL_VERSION" || |
| + key == "Sandboxed" || |
| + key == "Optimus" || |
| + key == "AMD switchable" || |
| + key == "Reset notification strategy" || |
| + key == "GPU process crash count" || |
| + key == "ErrorMessage") && (value == "")) { |
| + error = error + "Gpu data is incorrect."; |
|
Zhenyao Mo
2015/10/16 18:46:12
We may not always have GL strings because we only
sivag
2015/10/19 16:19:23
Done.
|
| + } |
|
Zhenyao Mo
2015/10/16 18:46:12
nit: indentation wrong.
sivag
2015/10/19 16:19:23
Done.
|
| } |
| - if(status) |
| - testPassed("Status message displayed for webglcontextcreationerror"); |
| + if (error.length) |
| + testFailed("webglcontextcreationerror test failed" + error); |
| else |
| - testFailed("Context creation error test failed"); |
| + testPassed("Status message displayed for webglcontextcreationerror"); |
| + |
| } |
| main(); |
| </script> |