browser_webconsole_network_unicode.js (1129B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 // Tests that Unicode characters within the domain are displayed 5 // encoded and not in Punycode or somehow garbled. 6 7 "use strict"; 8 9 const TEST_URL = 10 "http://example.com/browser/devtools/client/webconsole/test/browser/test-network-request.html"; 11 12 add_task(async function () { 13 await pushPref("devtools.webconsole.filter.netxhr", true); 14 15 const toolbox = await openNewTabAndToolbox(TEST_URL, "webconsole"); 16 const hud = toolbox.getCurrentPanel().hud; 17 18 const onMessage = waitForMessageByType(hud, "testxhr", ".network"); 19 20 const XHR_TEST_URL_WITHOUT_PARAMS = "http://flüge.example.com/testxhr"; 21 const XHR_TEST_URL = XHR_TEST_URL_WITHOUT_PARAMS + "?foo"; 22 SpecialPowers.spawn(gBrowser.selectedBrowser, [XHR_TEST_URL], url => { 23 content.fetch(url); 24 }); 25 26 info("Wait for expected messages to appear"); 27 const message = await onMessage; 28 29 const urlNode = message.node.querySelector(".url"); 30 is( 31 urlNode.textContent, 32 XHR_TEST_URL, 33 "The network call is displayed with the expected URL" 34 ); 35 });