Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-error-response.html

Issue 1384233003: Improve usefulness of webglcontextcreationerror statusMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ede14731c142e2de1c42e3a1dae976018475ae26 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
@@ -21,19 +21,25 @@ function initTest() {
}
function onContextCreationError(e) {
+ if (e.statusMessage.length == 0) {
+ testFailed("webglcontextcreationerror test failed");
+ return;
+ }
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(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>

Powered by Google App Engine
This is Rietveld 408576698