Commit d3174159 authored by Ionel Popescu's avatar Ionel Popescu Committed by Chromium LUCI CQ

Relax passing criteria for eye dropper test.

This CL changes the passing criteria for the eye dropper test to
account for monitors calibrated differently.

Bug: 1160234
Change-Id: If3444bd1621e76ffa42549e1bafb67879a522787
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616082
Commit-Queue: Ionel Popescu <iopopesc@microsoft.com>
Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841268}
parent c62443b8
......@@ -62,7 +62,13 @@
document.getElementById("color").addEventListener("input", function(e) {
let entry = log("color updated to " + e.target.value + " expected: #ff0000");
let span = document.createElement("span");
if (e.target.value == "#ff0000") {
let red = parseInt(e.target.value.substring(1, 3), 16);
let green = parseInt(e.target.value.substring(3, 5), 16);
let blue = parseInt(e.target.value.substring(5, 7), 16);
// Make sure the selected color is close to pure red (#FF0000), but allow
// some deviation due to monitor color calibration.
if (red >= 0xC0 && green <= 0x3F && blue <= 0x3F) {
span.innerText = "PASS ";
span.classList.add("passed");
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment