chromium/third_party/blink/web_tests/fast/forms/color/color-picker-appearance-color-well-accelerated-keyboard-navigation.html

<!DOCTYPE html>
<meta name=fuzzy content="maxDifference=0-3; totalPixels=0-1000">
<script>
testRunner.waitUntilDone();
</script>
<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>

<input type='color' id='color' value='#80D9FF'>

<p id='description' style='opacity: 0'></p>
<div id='console' style='opacity: 0'></div>

<script>
let t = async_test('Color picker: Moving the color well\'s selection ring using accelerated keyboard movement.');
t.step(() => {
  let colorControl = document.getElementById('color');
  openPicker(colorControl)
  .then(t.step_func_done(() => {
    internals.pagePopupWindow.focus();
    const popupDocument = internals.pagePopupWindow.document;
    const colorWellSelectionRing = popupDocument.querySelector('color-well > color-selection-ring');
    const colorWellSelectionRingRect = colorWellSelectionRing.getBoundingClientRect();
    eventSender.mouseMoveTo(colorWellSelectionRingRect.left + (colorWellSelectionRingRect.width / 2),
        colorWellSelectionRingRect.top + (colorWellSelectionRingRect.height / 2));
    eventSender.mouseDown();
    eventSender.mouseUp();
    for (let i = 0; i < 3; i++) {
      eventSender.keyDown('ArrowDown', ['ctrlKey']);
    }
    eventSender.keyDown('ArrowLeft', ['ctrlKey']);
    eventSender.keyDown('ArrowUp', ['ctrlKey']);
    for (let i = 0; i < 3; i++) {
      eventSender.keyDown('ArrowRight', ['ctrlKey']);
    }
    const rValueContainer = popupDocument.getElementById('rValueContainer');
    const gValueContainer = popupDocument.getElementById('gValueContainer');
    const bValueContainer = popupDocument.getElementById('bValueContainer');
    assert_equals(rValueContainer.value, '60');
    assert_equals(gValueContainer.value, '144');
    assert_equals(bValueContainer.value, '180');
  }));
});
</script>