Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
browser(firefox): use base64 to deliver post data (#3063)
Pavel Feldman7f29275aa2a6
diff --git a/browser_patches/firefox/BUILD_NUMBER b/browser_patches/firefox/BUILD_NUMBERindex 71ec431b77..e59ce259ce 100644--- a/browser_patches/firefox/BUILD_NUMBER+++ b/browser_patches/firefox/BUILD_NUMBER@@ -1,2 +1,2 @@-1135-Changed: [email protected] Tue Jul 21 09:15:13 PDT 2020+1136+Changed: [email protected] Tue Jul 21 09:33:13 PDT 2020diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.jsindex 2307fe6065..a4f59a570e 100644--- a/browser_patches/firefox/juggler/NetworkObserver.js+++ b/browser_patches/firefox/juggler/NetworkObserver.js@@ -708,15 +708,16 @@ function readRequestPostData(httpChannel) {}// Read data from the stream.- let text = undefined;+ let result = undefined;try {- text = NetUtil.readInputStreamToString(iStream, iStream.available());- const converter = Cc['@mozilla.org/intl/scriptableunicodeconverter']- .createInstance(Ci.nsIScriptableUnicodeConverter);- converter.charset = 'UTF-8';- text = converter.ConvertToUnicode(text);+ const buffer = NetUtil.readInputStream(iStream, iStream.available());+ const bytes = new Uint8Array(buffer);+ let binary = '';+ for (let i = 0; i < bytes.byteLength; i++)+ binary += String.fromCharCode(bytes[i]);+ result = btoa(binary);} catch (err) {- text = undefined;+ result = '';}// Seek locks the file, so seek to the beginning only if necko hasn't@@ -724,7 +725,7 @@ function readRequestPostData(httpChannel) {// not till 459384 is fixed).if (isSeekableStream && prevOffset == 0)iStream.seek(Ci.nsISeekableStream.NS_SEEK_SET, 0);- return text;+ return result;}function requestHeaders(httpChannel) {