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

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

Issue 826363002: Webgl Info should have vendorid and deviceid of gpu. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed unittest issue. Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/webgl/webgl-error-response.html
diff --git a/LayoutTests/fast/canvas/webgl/webgl-error-response.html b/LayoutTests/fast/canvas/webgl/webgl-error-response.html
index 79410177a2839e113a8a457263139f4fc74feb07..e866a237d28b4586468b4b98cd73958ea3459593 100644
--- a/LayoutTests/fast/canvas/webgl/webgl-error-response.html
+++ b/LayoutTests/fast/canvas/webgl/webgl-error-response.html
@@ -21,19 +21,16 @@ function initTest() {
}
function onContextCreationError(e) {
- var vendorInfoStr = "VendorInfo = ";
- var renderInfoStr = "RendererInfo = ";
- var driverInfoStr = "DriverInfo = ";
- var stringIndex = e.statusMessage.search(vendorInfoStr) + vendorInfoStr.length;
- var vendorInfo = e.statusMessage.substring(stringIndex, e.statusMessage.search(renderInfoStr) - 2);
- stringIndex = e.statusMessage.search(renderInfoStr) + renderInfoStr.length;
- var rendererInfo = e.statusMessage.substring(stringIndex, e.statusMessage.search(driverInfoStr) - 2 );
- stringIndex = e.statusMessage.search(driverInfoStr) + driverInfoStr.length;
- var driverInfo = e.statusMessage.substring(stringIndex, e.statusMessage.length - 1);
- if((e.statusMessage.search("GPUInfoCollectionFailure") != -1) ||
- vendorInfo.length > 0 ||
- rendererInfo.length > 0 ||
- driverInfo.length > 0)
+ var splitStatus = e.statusMessage.split(",");
+ var stringLocator = 1;
+ var status = true;
+ // Start iterating from 1 as , the initial message has no data.
+ for (var i = 1; i < splitStatus.length; i++) {
+ var gpuInfoStr = splitStatus[i].split(" = ");
+ if (gpuInfoStr[stringLocator] == "")
+ status = false;
+ }
+ if(status)
testPassed("Status message displayed for webglcontextcreationerror");
else
testFailed("Context creation error test failed");
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698