From 5e83682d6c5a40ca45e1d55b9efafaa481af62fa Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 15 Feb 2024 15:27:55 -0800 Subject: [PATCH] [test] Simplify new KeyboardEvent calls in test_browser.py. NFC (#21351) Closure knows about these property bags so there is no need to quote the keys. --- test/test_browser.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/test_browser.py b/test/test_browser.py index c18065a8a1b40..431c04e6faab4 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -923,14 +923,14 @@ def test_sdl_key(self, delay, async_, defines): create_file('pre.js', ''' function keydown(c) { %s - var event = new KeyboardEvent("keydown", { 'keyCode': c, 'charCode': c, 'view': window, 'bubbles': true, 'cancelable': true }); + var event = new KeyboardEvent('keydown', { keyCode: c, charCode: c, view: window, bubbles: true, cancelable: true }); document.dispatchEvent(event); %s } function keyup(c) { %s - var event = new KeyboardEvent("keyup", { 'keyCode': c, 'charCode': c, 'view': window, 'bubbles': true, 'cancelable': true }); + var event = new KeyboardEvent('keyup', { keyCode: c, charCode: c, view: window, bubbles: true, cancelable: true }); document.dispatchEvent(event); %s } @@ -953,12 +953,12 @@ def post(): html = html.replace('', '''