diff --git a/devtools/client/netmonitor/src/components/request-details/HeadersPanel.js b/devtools/client/netmonitor/src/components/request-details/HeadersPanel.js index 1e3fa96d58ea..735f3246cc02 100644 --- a/devtools/client/netmonitor/src/components/request-details/HeadersPanel.js +++ b/devtools/client/netmonitor/src/components/request-details/HeadersPanel.js @@ -2401,6 +2401,19 @@ stopPropagation ) ; } +onKeyDown +: +event += +> +{ +event +. +stopPropagation +( +) +; +} } span ( diff --git a/devtools/client/netmonitor/test/browser_net_complex-params.js b/devtools/client/netmonitor/test/browser_net_complex-params.js index edf0e9928471..4243e2fa7320 100644 --- a/devtools/client/netmonitor/test/browser_net_complex-params.js +++ b/devtools/client/netmonitor/test/browser_net_complex-params.js @@ -1115,15 +1115,43 @@ toggle " ) ; -clickElement +rawDataToggle +. +focus ( +) +; +EventUtils +. +synthesizeKey +( +" +VK_SPACE +" +{ +} rawDataToggle -monitor +. +ownerGlobal ) ; await waitForContent ; +ok +( +! +rawDataToggle +. +checked +" +Raw +toggle +is +unchecked +" +) +; } async function diff --git a/devtools/client/netmonitor/test/browser_net_headers_sorted.js b/devtools/client/netmonitor/test/browser_net_headers_sorted.js index 876e9e40d5b6..4691d4bb3b05 100644 --- a/devtools/client/netmonitor/test/browser_net_headers_sorted.js +++ b/devtools/client/netmonitor/test/browser_net_headers_sorted.js @@ -911,4 +911,124 @@ sorted " ) ; +for +( +const +rawToggleInput +of +document +. +querySelectorAll +( +" +. +devtools +- +checkbox +- +toggle +" +) +) +{ +ok +( +rawToggleInput +. +checked +" +Toggle +is +checked +" +) +; +rawToggleInput +. +focus +( +) +; +EventUtils +. +synthesizeKey +( +" +VK_SPACE +" +{ +} +rawToggleInput +. +ownerGlobal +) +; +} +await +waitUntil +( +( +) += +> +! +document +. +querySelector +( +" +textarea +. +raw +- +headers +" +) +) +; +ok +( +true +" +Raw +headers +are +hidden +" +) +; +for +( +const +rawToggleInput +of +document +. +querySelectorAll +( +" +. +devtools +- +checkbox +- +toggle +" +) +) +{ +ok +( +! +rawToggleInput +. +checked +" +Toggle +is +unchecked +" +) +; +} } diff --git a/devtools/client/netmonitor/test/browser_net_json_text_mime.js b/devtools/client/netmonitor/test/browser_net_json_text_mime.js index ace215eee733..477e966df2c1 100644 --- a/devtools/client/netmonitor/test/browser_net_json_text_mime.js +++ b/devtools/client/netmonitor/test/browser_net_json_text_mime.js @@ -427,6 +427,73 @@ testResponseTab ( ) ; +ok +( +rawResponseToggle +. +checked +" +Raw +toggle +is +checked +" +) +; +wait += +waitForDOM +( +document +" +# +response +- +panel +. +data +- +header +" +) +; +rawResponseToggle +. +focus +( +) +; +EventUtils +. +synthesizeKey +( +" +VK_SPACE +" +{ +} +rawResponseToggle +. +ownerGlobal +) +; +await +wait +; +ok +( +! +rawResponseToggle +. +checked +" +Raw +toggle +is +unchecked +" +) +; await teardown ( diff --git a/devtools/client/netmonitor/test/browser_net_ws-json-payload.js b/devtools/client/netmonitor/test/browser_net_ws-json-payload.js index ccf74a96b256..787ab9ddc9b3 100644 --- a/devtools/client/netmonitor/test/browser_net_ws-json-payload.js +++ b/devtools/client/netmonitor/test/browser_net_ws-json-payload.js @@ -663,6 +663,73 @@ correctly " ) ; +ok +( +rawDataToggle +. +checked +" +Raw +toggle +is +checked +" +) +; +wait += +waitForDOM +( +document +" +# +messages +- +view +. +data +- +label +" +) +; +rawDataToggle +. +focus +( +) +; +EventUtils +. +synthesizeKey +( +" +VK_SPACE +" +{ +} +rawDataToggle +. +ownerGlobal +) +; +await +wait +; +ok +( +! +rawDataToggle +. +checked +" +Raw +toggle +is +unchecked +" +) +; await SpecialPowers .