function testKey(opts) {

                    function getParam() {
                        if (opts.exact) {
                            var result = colorEditor._hsv[opts.param];
                            // Because of #2201, this is sometimes a string with a percentage value.
                            if (typeof result === "string" && result.charAt(result.length - 1) === "%") {
                                result = Number(result.substr(0, result.length - 1));
                            }
                            return result;
                        } else {
                            return tinycolor(colorEditor.getColor()).toHsv()[opts.param];
                        }
                    }

                    makeUI(opts.color || "hsla(50, 25%, 50%, 0.5)");

                    var before = getParam();
                    colorEditor[opts.item].trigger(makeKeyEvent(opts));

                    var after = getParam();
                    checkNear(after, before + opts.delta, opts.tolerance);
                }
Test a key event on the given UI element.
@param {object} opts The parameters to test:
    color: An optional initial value to set in the ColorEditor. Defaults to "hsla(50, 25%, 50%, 0.5)".
    item: The (string) name of the member of ColorEditor that references the element to test.
    key: The KeyEvent key code to simulate.
    shift: Optional boolean specifying whether to simulate the shift key being down (default false).
    param: The (string) parameter whose value we're testing (h, s, v, or a).
    delta: The expected change in value for the parameter.
    tolerance: The tolerance in variation for the expected value.
    exact: True to compare the actual values stored in the _hsv object, false (default) to
         compare tinycolor's normalization of the color value.