chromium/third_party/blink/web_tests/fast/forms/color/color-picker-zoom150-bottom-edge-no-nan.html

<!DOCTYPE html>
<meta name=fuzzy content="maxDifference=0-3; totalPixels=0-1000">
<script src='../../../resources/testharness.js'></script>
<script src='../../../resources/testharnessreport.js'></script>
<script src="../../../resources/testdriver.js"></script>
<script src="../../../resources/testdriver-vendor.js"></script>
<script src='../../../fast/forms/resources/picker-common.js'></script>
<body style='zoom: 1.5;'>
<input type='color' id='color' value='#80d9ff'>
<script>
'use strict';

let t = async_test('Color picker: Color values at the bottom edge of the color picker at zoom 150% should be valid numbers.');
t.step(() => {
  let colorControl = document.getElementById('color');
  openPicker(colorControl)
  .then(t.step_func_done(() => {
    internals.pagePopupWindow.focus();
    const popupDocument = internals.pagePopupWindow.document;
    const hexValueContainer = popupDocument.getElementById('hexValueContainer');
    assert_equals(hexValueContainer.value, '#80d9ff');
    const colorWellSelectionRing = popupDocument.querySelector('color-well > color-selection-ring');
    assert_equals(popupDocument.activeElement, colorWellSelectionRing);
    for (let i = 0; i < 10; i++) {
      eventSender.keyDown('ArrowDown', ['ctrlKey']);
    }
    assert_equals(hexValueContainer.value, '#000000', 'Selected color value should be \'#000000\'');
  }));
});
</script>