Backed out 3 changesets (bug 1459279) for failures on stub-generators/browser_webconsole_check_stubs_console_api.js on a CLOSED TREE
authorGurzau Raul <rgurzau@mozilla.com>
Tue, 22 May 2018 20:55:28 +0300
changeset 419346 75122e95e3212dd14d0608fe4b06e951ba8c427b
parent 419345 f2fc440dae2cff082c5b2ac1097812a95674a5a3
child 419347 fe91056fdd27e6e117888883129aed554815ab2a
push id103513
push userrgurzau@mozilla.com
push dateTue, 22 May 2018 17:56:15 +0000
treeherdermozilla-inbound@75122e95e321 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1459279
milestone62.0a1
backs out318ae5b0ec8b4e0f9250b2a96e8788896230041c
11740609e1dba90ff53604ea369c0cdb95dc48d5
545a2ee68554da59c510f0dd926bf08d18c2fce2
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 1459279) for failures on stub-generators/browser_webconsole_check_stubs_console_api.js on a CLOSED TREE Backed out changeset 318ae5b0ec8b (bug 1459279) Backed out changeset 11740609e1db (bug 1459279) Backed out changeset 545a2ee68554 (bug 1459279)
devtools/client/locales/en-US/webconsole.properties
devtools/client/webconsole/test/components/console-api-call.test.js
devtools/client/webconsole/test/fixtures/stub-generators/stub-snippets.js
devtools/client/webconsole/test/fixtures/stubs/consoleApi.js
devtools/client/webconsole/utils/messages.js
--- a/devtools/client/locales/en-US/webconsole.properties
+++ b/devtools/client/locales/en-US/webconsole.properties
@@ -44,20 +44,16 @@ timeEnd=%1$S: %2$Sms
 # call to console.clear() to let the user know the previous messages of the
 # console have been removed programmatically.
 consoleCleared=Console was cleared.
 
 # LOCALIZATION NOTE (noCounterLabel): this string is used to display
 # count-messages with no label provided.
 noCounterLabel=<no label>
 
-# LOCALIZATION NOTE (counterDoesntExist): this string is displayed when
-# console.countReset() is called with a counter that doesn't exist.
-counterDoesntExist=Counter “%S” doesn’t exist.
-
 # LOCALIZATION NOTE (noGroupLabel): this string is used to display
 # console.group messages with no label provided.
 noGroupLabel=<no group label>
 
 # LOCALIZATION NOTE (Autocomplete.blank): this string is used when inputnode
 # string containing anchor doesn't matches to any property in the content.
 Autocomplete.blank=  <- no result
 
--- a/devtools/client/webconsole/test/components/console-api-call.test.js
+++ b/devtools/client/webconsole/test/components/console-api-call.test.js
@@ -197,22 +197,16 @@ describe("ConsoleAPICall component:", ()
         key: "console.count | default: 3",
         expectedBodyText: "default: 3",
       }, {
         key: "console.count | default: 4",
         expectedBodyText: "default: 4",
       }, {
         key: "console.count | test counter: 3",
         expectedBodyText: "test counter: 3",
-      }, {
-        key: "console.countReset | test counter: 0",
-        expectedBodyText: "test counter: 0",
-      }, {
-        key: "console.countReset | counterDoesntExist",
-        expectedBodyText: "Counter “test counter” doesn't exist.",
       }];
 
       for (const {key, expectedBodyText} of messages) {
         const message = stubPreparedMessages.get(key);
         const wrapper = render(ConsoleApiCall({ message, serviceContainer }));
 
         expect(wrapper.find(".message-body").text()).toBe(expectedBodyText);
       }
--- a/devtools/client/webconsole/test/fixtures/stub-generators/stub-snippets.js
+++ b/devtools/client/webconsole/test/fixtures/stub-generators/stub-snippets.js
@@ -152,30 +152,26 @@ consoleApi.set("console.count", {
     "console.count | default: 1",
     "console.count | default: 2",
     "console.count | test counter: 1",
     "console.count | test counter: 2",
     "console.count | default: 3",
     "console.count | clear",
     "console.count | default: 4",
     "console.count | test counter: 3",
-    "console.countReset | test counter: 0",
-    "console.countReset | counterDoesntExist",
   ],
   code: `
     console.count();
     console.count();
     console.count("test counter");
     console.count("test counter");
     console.count();
     console.clear();
     console.count();
     console.count("test counter");
-    console.countReset("test counter");
-    console.countReset("test counter");
 `});
 
 // CSS messages
 const cssMessage = new Map();
 
 cssMessage.set("Unknown property", `
 p {
   such-unknown-property: wow;
--- a/devtools/client/webconsole/test/fixtures/stubs/consoleApi.js
+++ b/devtools/client/webconsole/test/fixtures/stubs/consoleApi.js
@@ -1616,120 +1616,16 @@ stubPreparedMessages.set(`console.count 
   "exceptionDocURL": null,
   "userProvidedStyles": [],
   "notes": null,
   "indent": 0,
   "prefix": "",
   "private": false
 }));
 
-stubPreparedMessages.set(`console.countReset | test counter: 0`, new ConsoleMessage({
-  "id": "1",
-  "allowRepeating": true,
-  "source": "console-api",
-  "timeStamp": 1526920412190,
-  "type": "log",
-  "helperType": null,
-  "level": "log",
-  "messageText": "test counter: 0",
-  "parameters": null,
-  "repeatId": "{\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html\",\"line\":10,\"column\":5},\"groupId\":null,\"indent\":0,\"level\":\"log\",\"messageText\":\"test counter: 0\",\"parameters\":null,\"source\":\"console-api\",\"type\":\"log\",\"userProvidedStyles\":[],\"private\":false}",
-  "stacktrace": null,
-  "frame": {
-    "source": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "line": 10,
-    "column": 5
-  },
-  "groupId": null,
-  "exceptionDocURL": null,
-  "userProvidedStyles": [],
-  "notes": null,
-  "indent": 0,
-  "prefix": "",
-  "private": false
-}));
-
-stubPreparedMessages.set(`console.countReset | counterDoesntExist`, new ConsoleMessage({
-  "id": "1",
-  "allowRepeating": true,
-  "source": "console-api",
-  "timeStamp": 1526920412191,
-  "type": "log",
-  "helperType": null,
-  "level": "warn",
-  "messageText": "Counter “test counter” doesn't exist.",
-  "parameters": null,
-  "repeatId": "{\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html\",\"line\":11,\"column\":5},\"groupId\":null,\"indent\":0,\"level\":\"warn\",\"messageText\":\"Counter “test counter” doesn't exist.\",\"parameters\":null,\"source\":\"console-api\",\"type\":\"log\",\"userProvidedStyles\":[],\"private\":false}",
-  "stacktrace": null,
-  "frame": {
-    "source": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "line": 11,
-    "column": 5
-  },
-  "groupId": null,
-  "exceptionDocURL": null,
-  "userProvidedStyles": [],
-  "notes": null,
-  "indent": 0,
-  "prefix": "",
-  "private": false
-}));
-
-stubPreparedMessages.set(`console.countReset | test counter: 0`, new ConsoleMessage({
-  "id": "1",
-  "allowRepeating": true,
-  "source": "console-api",
-  "timeStamp": 1526920412190,
-  "type": "log",
-  "helperType": null,
-  "level": "log",
-  "messageText": "test counter: 0",
-  "parameters": null,
-  "repeatId": "{\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html\",\"line\":10,\"column\":5},\"groupId\":null,\"indent\":0,\"level\":\"log\",\"messageText\":\"test counter: 0\",\"parameters\":null,\"source\":\"console-api\",\"type\":\"log\",\"userProvidedStyles\":[],\"private\":false}",
-  "stacktrace": null,
-  "frame": {
-    "source": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "line": 10,
-    "column": 5
-  },
-  "groupId": null,
-  "exceptionDocURL": null,
-  "userProvidedStyles": [],
-  "notes": null,
-  "indent": 0,
-  "prefix": "",
-  "private": false
-}));
-
-stubPreparedMessages.set(`console.countReset | counterDoesntExist`, new ConsoleMessage({
-  "id": "1",
-  "allowRepeating": true,
-  "source": "console-api",
-  "timeStamp": 1526920412191,
-  "type": "log",
-  "helperType": null,
-  "level": "warn",
-  "messageText": "Counter “test counter” doesn't exist.",
-  "parameters": null,
-  "repeatId": "{\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html\",\"line\":11,\"column\":5},\"groupId\":null,\"indent\":0,\"level\":\"warn\",\"messageText\":\"Counter “test counter” doesn't exist.\",\"parameters\":null,\"source\":\"console-api\",\"type\":\"log\",\"userProvidedStyles\":[],\"private\":false}",
-  "stacktrace": null,
-  "frame": {
-    "source": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "line": 11,
-    "column": 5
-  },
-  "groupId": null,
-  "exceptionDocURL": null,
-  "userProvidedStyles": [],
-  "notes": null,
-  "indent": 0,
-  "prefix": "",
-  "private": false
-}));
-
 stubPackets.set(`console.log('foobar', 'test')`, {
   "from": "server1.conn0.child1/consoleActor2",
   "type": "consoleAPICall",
   "message": {
     "addonId": "",
     "arguments": [
       "foobar",
       "test"
@@ -3237,124 +3133,12 @@ stubPackets.set(`console.count | test co
     "timeStamp": 1511365913335,
     "timer": null,
     "workerType": "none",
     "styles": [],
     "category": "webdev"
   }
 });
 
-stubPackets.set(`console.countReset | test counter: 0`, {
-  "from": "server1.conn0.child1/consoleActor2",
-  "type": "consoleAPICall",
-  "message": {
-    "addonId": "",
-    "arguments": [
-      "test counter"
-    ],
-    "columnNumber": 5,
-    "counter": {
-      "count": 0,
-      "label": "test counter"
-    },
-    "filename": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "functionName": "triggerPacket",
-    "groupName": "",
-    "level": "countReset",
-    "lineNumber": 10,
-    "prefix": "",
-    "private": false,
-    "timeStamp": 1526920412190,
-    "timer": null,
-    "workerType": "none",
-    "styles": [],
-    "category": "webdev"
-  }
-});
-
-stubPackets.set(`console.countReset | counterDoesntExist`, {
-  "from": "server1.conn0.child1/consoleActor2",
-  "type": "consoleAPICall",
-  "message": {
-    "addonId": "",
-    "arguments": [
-      "test counter"
-    ],
-    "columnNumber": 5,
-    "counter": {
-      "error": "counterDoesntExist",
-      "label": "test counter"
-    },
-    "filename": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "functionName": "triggerPacket",
-    "groupName": "",
-    "level": "countReset",
-    "lineNumber": 11,
-    "prefix": "",
-    "private": false,
-    "timeStamp": 1526920412191,
-    "timer": null,
-    "workerType": "none",
-    "styles": [],
-    "category": "webdev"
-  }
-});
-
-stubPackets.set(`console.countReset | test counter: 0`, {
-  "from": "server1.conn0.child1/consoleActor2",
-  "type": "consoleAPICall",
-  "message": {
-    "addonId": "",
-    "arguments": [
-      "test counter"
-    ],
-    "columnNumber": 5,
-    "counter": {
-      "count": 0,
-      "label": "test counter"
-    },
-    "filename": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "functionName": "triggerPacket",
-    "groupName": "",
-    "level": "countReset",
-    "lineNumber": 10,
-    "prefix": "",
-    "private": false,
-    "timeStamp": 1526920412190,
-    "timer": null,
-    "workerType": "none",
-    "styles": [],
-    "category": "webdev"
-  }
-});
-
-stubPackets.set(`console.countReset | counterDoesntExist`, {
-  "from": "server1.conn0.child1/consoleActor2",
-  "type": "consoleAPICall",
-  "message": {
-    "addonId": "",
-    "arguments": [
-      "test counter"
-    ],
-    "columnNumber": 5,
-    "counter": {
-      "error": "counterDoesntExist",
-      "label": "test counter"
-    },
-    "filename": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
-    "functionName": "triggerPacket",
-    "groupName": "",
-    "level": "countReset",
-    "lineNumber": 11,
-    "prefix": "",
-    "private": false,
-    "timeStamp": 1526920412191,
-    "timer": null,
-    "workerType": "none",
-    "styles": [],
-    "category": "webdev"
-  }
-});
-
 module.exports = {
   stubPreparedMessages,
   stubPackets,
 };
--- a/devtools/client/webconsole/utils/messages.js
+++ b/devtools/client/webconsole/utils/messages.js
@@ -78,28 +78,23 @@ function transformConsoleAPICallPacket(p
 
   // Special per-type conversion.
   switch (type) {
     case "clear":
       // We show a message to users when calls console.clear() is called.
       parameters = [l10n.getStr("consoleCleared")];
       break;
     case "count":
-    case "countReset":
       // Chrome RDP doesn't have a special type for count.
       type = MESSAGE_TYPE.LOG;
       let {counter} = message;
 
       if (!counter) {
         // We don't show anything if we don't have counter data.
         type = MESSAGE_TYPE.NULL_MESSAGE;
-      } else if (counter.error) {
-        messageText = l10n.getFormatStr(counter.error, [counter.label]);
-        level = MESSAGE_LEVEL.WARN;
-        parameters = null;
       } else {
         let label = counter.label ? counter.label : l10n.getStr("noCounterLabel");
         messageText = `${label}: ${counter.count}`;
         parameters = null;
       }
       break;
     case "time":
       parameters = null;