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

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: Resetnotification strategy should be uint. 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..e932d626739a3abcf94f3eccd8997961576ca1dd 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,31 @@ 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 == ""))
Ken Russell (switch to Gerrit) 2015/10/15 21:30:28 Space after "if".
sivag 2015/10/16 18:29:20 Done.
+ error = error +"DeviceID is null.";
Ken Russell (switch to Gerrit) 2015/10/15 21:30:28 Add space after "+".
sivag 2015/10/16 18:29:19 Done.
+ if(key == "VENDOR" && (value == "0x0000" || value == ""))
Ken Russell (switch to Gerrit) 2015/10/15 21:30:28 Space after "if".
sivag 2015/10/16 18:29:19 Done.
+ error = error + "VendorID is null.";
+ if((key != "GL_VENDOR" ||
Ken Russell (switch to Gerrit) 2015/10/15 21:30:28 Space after "if".
sivag 2015/10/16 18:29:20 Done.
+ 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 == ""))
Ken Russell (switch to Gerrit) 2015/10/15 21:30:28 Please use an open-brace after the parenthesis her
sivag 2015/10/16 18:29:19 Done.
+ error = error + "Gpu data is incorrect.";
Zhenyao Mo 2015/10/15 22:30:37 This condition is true if key == "DEVICE" or "VEND
sivag 2015/10/16 18:29:19 Done.
sivag 2015/10/16 18:29:20 i corrected it, it was supposed to check if one of
}
- if(status)
- testPassed("Status message displayed for webglcontextcreationerror");
+ if(error.length)
Ken Russell (switch to Gerrit) 2015/10/15 21:30:28 Space after "if".
sivag 2015/10/16 18:29:19 Done.
+ 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