Bug 1165489 - Make the web console aware of coneole.timeStamp(). r=jsantell, a=sledru
authorPanos Astithas <past@mozilla.com>
Mon, 18 May 2015 12:06:02 +0300
changeset 274747 1285485b0f929ada9573bb283483322075ffd425
parent 274746 a06bc930e34c42f2b93ff5a337d6db2493c38c94
child 274748 9365e6378cc0869a122b82846c1aec1cbb9a5779
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjsantell, sledru
bugs1165489
milestone40.0a2
Bug 1165489 - Make the web console aware of coneole.timeStamp(). r=jsantell, a=sledru
browser/devtools/webconsole/test/test-console-extras.html
browser/devtools/webconsole/webconsole.js
--- a/browser/devtools/webconsole/test/test-console-extras.html
+++ b/browser/devtools/webconsole/test/test-console-extras.html
@@ -1,17 +1,16 @@
 <!DOCTYPE HTML>
 <html dir="ltr" xml:lang="en-US" lang="en-US"><head>
     <meta charset="utf-8">
     <title>Console extended API test</title>
     <script type="text/javascript">
       function test() {
         console.log("start");
-        console.clear()
-        console.timeStamp()
+        console.clear();
         console.log("end");
       }
     </script>
   </head>
   <body>
     <h1 id="header">Heads Up Display Demo</h1>
     <button onclick="test();">Test Extended API</button>
     <div id="myDiv"></div>
--- a/browser/devtools/webconsole/webconsole.js
+++ b/browser/devtools/webconsole/webconsole.js
@@ -1329,16 +1329,21 @@ WebConsoleFrame.prototype = {
           Cu.reportError(l10n.getStr(counter.error));
           return null;
         }
         let msg = new Messages.ConsoleGeneric(aMessage);
         node = msg.init(this.output).render().element;
         break;
       }
 
+      case "timeStamp": {
+        // console.timeStamp() doesn't need to display anything.
+        return null;
+      }
+
       default:
         Cu.reportError("Unknown Console API log level: " + level);
         return null;
     }
 
     // Release object actors for arguments coming from console API methods that
     // we ignore their arguments.
     switch (level) {