mac: tests: Fix NOTREACHED with ViewsTextfieldTest.TextfieldKeyEvent

This commit is contained in:
Marshall Greenblatt 2023-07-24 16:03:39 -04:00
parent b07a9e1843
commit 4fc5fb8690
2 changed files with 18 additions and 0 deletions

View File

@ -644,5 +644,10 @@ patches = [
# mac: Keep bubble popups on-screen.
# https://bugs.chromium.org/p/chromium/issues/detail?id=893292#c10
'name': 'mac_platform_style_bubble_893292'
},
{
# mac: Fix NOTREACHED with ViewsTextfieldTest.TextfieldKeyEvent.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1467329
'name': 'mac_keyboard_conversion_1467329'
}
]

View File

@ -0,0 +1,13 @@
diff --git ui/events/keycodes/keyboard_code_conversion_mac.mm ui/events/keycodes/keyboard_code_conversion_mac.mm
index 0d8befe370520..93e324e5e3784 100644
--- ui/events/keycodes/keyboard_code_conversion_mac.mm
+++ ui/events/keycodes/keyboard_code_conversion_mac.mm
@@ -939,7 +939,7 @@ DomKey DomKeyFromNSEvent(NSEvent* event) {
return DomKeyFromKeyCode(event.keyCode);
}
default:
- NOTREACHED_NORETURN();
+ return ui::DomKey::NONE;
}
}