Commit e286ef784996da4df5899cb66c95b026bcef36f1

Solti 2025-07-24T21:19:54

ANGLE: Add validation test for GL_RENDERER string format This change introduces a new ANGLE end-to-end test to validate the format of the GL_RENDERER string, preventing regressions caused by downstream modifications. A recent issue (b/318636997) was caused by a partner modifying the ANGLE GL_RENDERER string in a way that broke Skia's parser. This revealed that the string format is a de-facto API contract that must be enforced. This new test, RendererTest.ValidateCanonicalFormat, serves as an automated guardrail and will become part of the Android CTS. The test enforces the following structural contract: 1. The overall structure must be "ANGLE (Vendor, Renderer, Version)". 2. The separator between components must be ", ". 3. The Vendor, Renderer, and Version components must not be empty. This ensures the string is parsable by clients like Skia without over-constraining the content of the component strings, which may originate from underlying drivers. The test correctly skips validation on the Null backend, which is not subject to this contract. Test: autoninja -C out/Android angle_end2end_tests && out/Android/angle_end2end_tests --gtest_filter="RendererTest.*" --num-retries=0 Bug: b/432805963 Change-Id: I1202074cc9f4413ee88e4534fb72fb71101721e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6788522 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>