Bug 1334617 followup - Eslint loves commented code. a=tomcat
authorMarco Bonardo <mbonardo@mozilla.com>
Tue, 07 Mar 2017 17:35:52 +0100
changeset 494684 3d341b9ba5353b6b8ab45b6ca03dcb1b2d789faa
parent 494683 8718138ada821a31e92f80a7f6d25fa119ff498e
child 494685 54b30e112ea76f4ffd7bece0f9ca4ca525e4e6a6
child 494688 6852033944f24e3d37a374542d3c9dd982b1ef0c
child 494689 6e350b0749dba2312447850f2150aa51ee5aae7a
child 494691 bd02116da51ef59f316247826d8cd8124ce8bb36
child 494694 0d37d2f7865abee8373fb5d02589340ffa7d9ece
child 494695 269d1e9c93cbed27247d96b9549b1fec48df009e
child 494704 87ed13dd2e7809474ed9d9c026f061fcd58e599f
child 494711 4c2b51aeb7b306ff3eb7621563245b2f9f513af0
child 494712 227b226e2891d08f7cee524ee3b6c3fef60d2003
child 494715 c59b65740b5b849a553a16c9b068179758601e49
child 494720 fc50ad3760aacd2475a834bba04ff1d37a6cf62e
child 494737 c8d2bc46fb8ecc165f0559a223dd58563f30b8e7
child 494744 0932432de8de91b814b1a335af237c4b34f2daed
child 494746 46d0e55291202016d81daf958a1d301137dbdfdb
child 494762 4b0921e13642d59a641d166b20054052d674f9c1
child 494792 0a968b1e6e139dc9978dce8dc6ede6269458d1c8
child 494805 f29d1f21770530b433330112c77569f6b62ef83f
child 494808 36ad3f92e6eff3918f90a6a4108d3a84bf47713b
child 494811 f14b7c6f332018c53e2649e59a27e7731dd81cbd
child 494818 8d2e1850c1617fc85c0a6ea4433236842e830dde
child 494819 b32cb0271e59b7f18a33b708f651df31af9cae9a
child 494820 b29be242bcdcbe650a3d9fdd9d014fd2ebd5456f
child 494823 10d2965a9b7309869ab7651bc125c8ae0ca0d499
child 494824 8f4c2789782d83f57305d02b052ae40e421df839
child 494829 1b548bffa88e4a4577d05cb8a65c465e0e719ac5
child 494830 ef1c87755d542151c8644bac9d62cd0c7feb6a75
child 494831 78e347a03a5326c06ee14d43aeeab4d90a6eecf1
child 494833 d93ad5d3d59cd9888d1e26b74c7b156a8ff1a95f
child 494834 e0e9c63ff4b3e0b4719d9d9f4add8a2917f54aba
child 494837 132091756964060ca1be3605b4b4c20187d2205d
child 494838 88dfd24062c5a37c346ab62163336b4f4b3912ac
child 494850 9ff0dca09c3997f6a58364aae1ba99e258c78908
child 494889 18ff025671c9dd5e2e30d441940f5c2fb804cae3
child 494890 a87baf35ba334bd59bad7e8a92cc7ce6c7d0c9d8
child 494916 ef1b5a8f85a3c0f825b9054fa7dce367c9c18784
child 494991 de55240a54c28046eda20530f610248ba2a02161
child 495015 8da7a2409a2b09faa45b47b903db860e4e6fc16b
child 495039 0b400d4313237d96b0500a349d2bb49e83e279c9
child 495041 8c2534b6ae4f822a856188c69d84a8d5dd211a74
child 495048 b4cd85eeb23ea48f1e08ac2c1783c9431b5a4ae4
child 495062 8daa40d8a081fc9e1cb614f510835c2e72f4ee56
child 495071 3d06fa4384844240ffa9863f037ea147e2d5500c
child 495081 c1bb4166c6b08cd91f3a0d21c6e1f8099ed57458
child 495101 ccd499e7a92daab076fd9fba8a0dff2d18223875
child 495151 853f7c55fdfb1667f22f22d54b326ab94d4e706d
child 495224 ce1c8985547a43c8f16bce7be3302ec20a22a028
child 495347 464ec71d4f4369d6487ba220fa9b11efc5bbf9c4
child 495348 7baac37cf78599605ed274d7165ad8746626828c
child 495398 9631d89364247bb2d41a8a4beebd1f71d997b1cc
child 495430 e4a8bf781d17f64c78eb21354be0097f3621a6c5
child 495439 50d635acd8fffc7361d65982120223d6320fcd7e
child 495441 9bd06b3dc33b4916b3d3e4087e1bf71fe8c598de
child 495443 d1aa81e483c4fe8307919b6f98feac0fa297bf72
child 495477 0a095cccd2b35d336f3d33119d7db2ed238e1117
child 495479 6cc3059b8d978bb295be2196914c769a8ef174ff
child 495483 458f9026d16d5c86ead414413661aa758d326c35
child 495539 8bf0947768cea52dab05d21051a9b06f1802da57
child 495541 8d888f5863aca69578ea1998607a52ebcf2547cb
child 495568 01b77f6455e3629811b9f6422e950c89f87c4b4f
child 495639 e8f63376c595d855f952ca51002204f062f3ded1
child 495855 0eac1d9fa110e3cc5634c9a4cc09c6422df6f1bb
child 495932 1790c8f9f00b8751063d7b308fa661f31c0c05e1
child 495983 1b29d55ec6c0878fe624b9f69e5ecfcf3edeb97d
child 496001 3c6bad9986ac36d6276c320f1b1b882495745bf8
child 496002 04ac97a952ba8f7b16aac85eb3db97001bb929f2
child 496058 9d918ca85bae0d5653e730c174eaa3bdd8f9caac
child 496174 835ed4d64bdb6094d6f3f02b0b41566ccb04bba4
child 496179 b297a91f29123d23eedf8cf40bf6fd1437ad7805
child 496819 e3ffffd11ff71f2079597fefd0eeb9a5442c60f1
child 497186 cf02f510af52f5264e26b9fdee9b3e32b7eef581
child 497187 f8f89abd1d118e4f3522127a287589c22527b525
child 497779 807bea45243e3787bc69d852733790e40dba009a
child 497847 e958706c3fc1eeadefdd51c00b4bca4621a02ff1
child 497848 befc926d0eaf5bbe26aaa921e94c81347999125a
child 498350 b9d975eb94b8db19a8cbcf9380ff78d39133dc8b
child 498358 27ae5c6fb692c0e6d38ead1f4afca868319cc3e9
child 498504 d9845db6a4388fa74bf9eacefbfdd7a8ce6f7bba
child 499343 08b1e5b63a75644cce3dcccb009cb3473011fb27
child 499448 9b2ed6c4f1e1659378a94605384ba2319bbe1b7a
child 499519 5ff6fa12b73db02944eee3e592d7bee940439b7b
child 499696 9c0611b05017ca8d807dde42fa218e616df4dab9
child 500142 716e5d46e367febe90df6721fbff356fcb0f7a12
child 500154 2aa06029375ecbfdec8a4556231acca644445514
child 500393 0864b508a9c50e916ffbd817ed55fd2ce9bdf2e0
child 501737 33ef225bf67c16ee88e6f4e9233caf92a9f93b18
child 552877 78d4896d8a172ff214b498a0259d8714e307dc63
child 558450 74473b0b14e3ebdc3f7095a83412c8772b796aae
push id48089
push userbmo:jjones@mozilla.com
push dateTue, 07 Mar 2017 16:40:45 +0000
reviewerstomcat
bugs1334617
milestone55.0a1
Bug 1334617 followup - Eslint loves commented code. a=tomcat MozReview-Commit-ID: HEeFwdv8c7j
browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
--- a/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
@@ -95,19 +95,19 @@ add_task(function* setup() {
     Services.telemetry.setEventRecordingEnabled("navigation", false);
   });
 });
 
 add_task(function* test_simpleQuery() {
   // Let's reset the counts.
   Services.telemetry.clearScalars();
   Services.telemetry.clearEvents();
-  //let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
   let resultTypeHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_TYPE");
-  //resultIndexHist.clear();
+  // resultIndexHist.clear();
   resultTypeHist.clear();
 
   let search_hist = getSearchCountsHistogram();
 
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank");
 
   info("Simulate entering a simple search.");
   let p = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
@@ -125,34 +125,34 @@ add_task(function* test_simpleQuery() {
   checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 1);
 
   // Also check events.
   let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search");
   checkEvents(events, [["navigation", "search", "urlbar", "enter", {engine: "other-MozSearch"}]]);
 
   // Check the histograms as well.
-  //let resultIndexes = resultIndexHist.snapshot();
-  //checkHistogramResults(resultIndexes, 0, "FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexes = resultIndexHist.snapshot();
+  // checkHistogramResults(resultIndexes, 0, "FX_URLBAR_SELECTED_RESULT_INDEX");
 
   let resultTypes = resultTypeHist.snapshot();
   checkHistogramResults(resultTypes,
     URLBAR_SELECTED_RESULT_TYPES.searchengine,
     "FX_URLBAR_SELECTED_RESULT_TYPE");
 
   yield BrowserTestUtils.removeTab(tab);
 });
 
 add_task(function* test_searchAlias() {
   // Let's reset the counts.
   Services.telemetry.clearScalars();
   Services.telemetry.clearEvents();
-  //let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
   let resultTypeHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_TYPE");
-  //resultIndexHist.clear();
+  // resultIndexHist.clear();
   resultTypeHist.clear();
 
   let search_hist = getSearchCountsHistogram();
 
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank");
 
   info("Search using a search alias.");
   let p = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
@@ -170,34 +170,34 @@ add_task(function* test_searchAlias() {
   checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 1);
 
   // Also check events.
   let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search");
   checkEvents(events, [["navigation", "search", "urlbar", "alias", {engine: "other-MozSearch"}]]);
 
   // Check the histograms as well.
-  //let resultIndexes = resultIndexHist.snapshot();
-  //checkHistogramResults(resultIndexes, 0, "FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexes = resultIndexHist.snapshot();
+  // checkHistogramResults(resultIndexes, 0, "FX_URLBAR_SELECTED_RESULT_INDEX");
 
   let resultTypes = resultTypeHist.snapshot();
   checkHistogramResults(resultTypes,
     URLBAR_SELECTED_RESULT_TYPES.searchengine,
     "FX_URLBAR_SELECTED_RESULT_TYPE");
 
   yield BrowserTestUtils.removeTab(tab);
 });
 
 add_task(function* test_oneOff() {
   // Let's reset the counts.
   Services.telemetry.clearScalars();
   Services.telemetry.clearEvents();
-  //let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
   let resultTypeHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_TYPE");
-  //resultIndexHist.clear();
+  // resultIndexHist.clear();
   resultTypeHist.clear();
 
   let search_hist = getSearchCountsHistogram();
 
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank");
 
   info("Perform a one-off search using the first engine.");
   let p = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
@@ -218,34 +218,34 @@ add_task(function* test_oneOff() {
   checkKeyedHistogram(search_hist, "other-MozSearch.urlbar", 1);
 
   // Also check events.
   let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search");
   checkEvents(events, [["navigation", "search", "urlbar", "oneoff", {engine: "other-MozSearch"}]]);
 
   // Check the histograms as well.
-  //let resultIndexes = resultIndexHist.snapshot();
-  //checkHistogramResults(resultIndexes, 0, "FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexes = resultIndexHist.snapshot();
+  // checkHistogramResults(resultIndexes, 0, "FX_URLBAR_SELECTED_RESULT_INDEX");
 
   let resultTypes = resultTypeHist.snapshot();
   checkHistogramResults(resultTypes,
     URLBAR_SELECTED_RESULT_TYPES.searchengine,
     "FX_URLBAR_SELECTED_RESULT_TYPE");
 
   yield BrowserTestUtils.removeTab(tab);
 });
 
 add_task(function* test_suggestion() {
   // Let's reset the counts.
   Services.telemetry.clearScalars();
   Services.telemetry.clearEvents();
-  //let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX");
   let resultTypeHist = Services.telemetry.getHistogramById("FX_URLBAR_SELECTED_RESULT_TYPE");
-  //resultIndexHist.clear();
+  // resultIndexHist.clear();
   resultTypeHist.clear();
 
   let search_hist = getSearchCountsHistogram();
 
   // Create an engine to generate search suggestions and add it as default
   // for this test.
   const url = getRootDirectory(gTestPath) + "usageTelemetrySearchSuggestions.xml";
   let suggestionEngine = yield new Promise((resolve, reject) => {
@@ -278,18 +278,18 @@ add_task(function* test_suggestion() {
   checkKeyedHistogram(search_hist, searchEngineId + ".urlbar", 1);
 
   // Also check events.
   let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search");
   checkEvents(events, [["navigation", "search", "urlbar", "suggestion", {engine: searchEngineId}]]);
 
   // Check the histograms as well.
-  //let resultIndexes = resultIndexHist.snapshot();
-  //checkHistogramResults(resultIndexes, 3, "FX_URLBAR_SELECTED_RESULT_INDEX");
+  // let resultIndexes = resultIndexHist.snapshot();
+  // checkHistogramResults(resultIndexes, 3, "FX_URLBAR_SELECTED_RESULT_INDEX");
 
   let resultTypes = resultTypeHist.snapshot();
   checkHistogramResults(resultTypes,
     URLBAR_SELECTED_RESULT_TYPES.searchsuggestion,
     "FX_URLBAR_SELECTED_RESULT_TYPE");
 
   Services.search.currentEngine = previousEngine;
   Services.search.removeEngine(suggestionEngine);