summaryrefslogtreecommitdiffstats
path: root/devtools
diff options
context:
space:
mode:
Diffstat (limited to 'devtools')
-rw-r--r--devtools/client/locales/en-US/inspector.properties2
-rw-r--r--devtools/client/netmonitor/test/browser_net_curl-utils.js11
-rw-r--r--devtools/client/netmonitor/test/html_curl-utils.html17
-rw-r--r--devtools/client/shared/curl.js2
4 files changed, 25 insertions, 7 deletions
diff --git a/devtools/client/locales/en-US/inspector.properties b/devtools/client/locales/en-US/inspector.properties
index b6f3e072b..252d72bfa 100644
--- a/devtools/client/locales/en-US/inspector.properties
+++ b/devtools/client/locales/en-US/inspector.properties
@@ -66,7 +66,7 @@ inspector.collapsePane=Collapse pane
# inspector UI.
inspector.expandPane=Expand pane
-# LOCALIZATION NOTE (inspector.searchResultsCount): This is the label that
+# LOCALIZATION NOTE (inspector.searchResultsCount2): This is the label that
# will show up next to the inspector search box. %1$S is the current result
# index and %2$S is the total number of search results. For example: "3 of 9".
# This won't be visible until the search box is updated in Bug 835896.
diff --git a/devtools/client/netmonitor/test/browser_net_curl-utils.js b/devtools/client/netmonitor/test/browser_net_curl-utils.js
index 0d35c6141..afac78cfc 100644
--- a/devtools/client/netmonitor/test/browser_net_curl-utils.js
+++ b/devtools/client/netmonitor/test/browser_net_curl-utils.js
@@ -18,7 +18,7 @@ add_task(function* () {
RequestsMenu.lazyUpdate = false;
- let wait = waitForNetworkEvents(monitor, 1, 3);
+ let wait = waitForNetworkEvents(monitor, 1, 4);
yield ContentTask.spawn(tab.linkedBrowser, SIMPLE_SJS, function* (url) {
content.wrappedJSObject.performRequests(url);
});
@@ -27,8 +27,9 @@ add_task(function* () {
let requests = {
get: RequestsMenu.getItemAtIndex(0),
post: RequestsMenu.getItemAtIndex(1),
- multipart: RequestsMenu.getItemAtIndex(2),
- multipartForm: RequestsMenu.getItemAtIndex(3)
+ patch: RequestsMenu.getItemAtIndex(2),
+ multipart: RequestsMenu.getItemAtIndex(3),
+ multipartForm: RequestsMenu.getItemAtIndex(4)
};
let data = yield createCurlData(requests.get.attachment, gNetwork);
@@ -40,6 +41,10 @@ add_task(function* () {
testWriteEmptyPostDataTextParams(data);
testDataArgumentOnGeneratedCommand(data);
+ data = yield createCurlData(requests.patch.attachment, gNetwork);
+ testWritePostDataTextParams(data);
+ testDataArgumentOnGeneratedCommand(data);
+
data = yield createCurlData(requests.multipart.attachment, gNetwork);
testIsMultipartRequest(data);
testGetMultipartBoundary(data);
diff --git a/devtools/client/netmonitor/test/html_curl-utils.html b/devtools/client/netmonitor/test/html_curl-utils.html
index 8ff7ecdf0..eb5c0c5b6 100644
--- a/devtools/client/netmonitor/test/html_curl-utils.html
+++ b/devtools/client/netmonitor/test/html_curl-utils.html
@@ -52,6 +52,17 @@
xhr.send(params);
}
+ function ajaxPatch(aUrl, aCallback) {
+ let xhr = new XMLHttpRequest();
+ xhr.open("PATCH", aUrl, true);
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ xhr.onload = function() {
+ aCallback();
+ };
+ var params = "param1=value1&param2=value2&param3=value3";
+ xhr.send(params);
+ }
+
function ajaxMultipart(aUrl, aCallback) {
var xhr = new XMLHttpRequest();
xhr.open("POST", aUrl, true);
@@ -88,8 +99,10 @@
function performRequests(aUrl) {
ajaxGet(aUrl, () => {
ajaxPost(aUrl, () => {
- ajaxMultipart(aUrl, () => {
- submitForm();
+ ajaxPatch(aUrl, () => {
+ ajaxMultipart(aUrl, () => {
+ submitForm();
+ });
});
});
});
diff --git a/devtools/client/shared/curl.js b/devtools/client/shared/curl.js
index 45122be37..420fe6aa5 100644
--- a/devtools/client/shared/curl.js
+++ b/devtools/client/shared/curl.js
@@ -77,7 +77,7 @@ const Curl = {
// Create post data.
let postData = [];
if (utils.isUrlEncodedRequest(data) ||
- ["PUT", "POST"].includes(data.method)) {
+ ["PUT", "POST", "PATCH"].includes(data.method)) {
postDataText = data.postDataText;
postData.push("--data");
postData.push(escapeString(utils.writePostDataTextParams(postDataText)));