<!DOCTYPE html>
<meta name=fuzzy content="maxDifference=0-3; totalPixels=0-1000">
<script>
testRunner.dumpAsText();
testRunner.waitUntilDone();
</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'>
<p id='description' style='opacity: 0'></p>
<div id='console' style='opacity: 0'></div>
<script>
let descriptionContainer = document.getElementById('description');
var colorControl = document.getElementById('color');
openPickerDeprecatedJsTest(colorControl, openPickerCallback, openPickerCallback);
function openPickerCallback() {
if (internals.pagePopupWindow) {
descriptionContainer.append('Popup opened.', document.createElement('br'));
// The color picker popup should close when the input type changes.
colorControl.type = 'text';
if (internals.pagePopupWindow) {
descriptionContainer.append('Popup did not close when the input type changed.');
} else {
descriptionContainer.append('Popup closed when the input type changed.');
}
} else {
descriptionContainer.append('Popup did not open.');
}
descriptionContainer.append(document.createElement('br'), 'TEST COMPLETE');
testRunner.notifyDone();
}
</script>