browser_telemetry_misc.js (1175B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 const TEST_URI = 7 "data:text/html;charset=utf-8,<p>browser_telemetry_misc.js</p>"; 8 const TOOL_DELAY = 0; 9 10 add_task(async function () { 11 await addTab(TEST_URI); 12 13 startTelemetry(); 14 15 await openAndCloseToolbox(1, TOOL_DELAY, "inspector"); 16 checkResults(); 17 18 gBrowser.removeCurrentTab(); 19 }); 20 21 function checkResults() { 22 // For help generating these tests use generateTelemetryTests("DEVTOOLS_") 23 // here. 24 checkTelemetry("DEVTOOLS_TOOLBOX_OPENED_COUNT", "", { 0: 1, 1: 0 }, "array"); 25 checkTelemetry( 26 "DEVTOOLS_INSPECTOR_OPENED_COUNT", 27 "", 28 { 0: 1, 1: 0 }, 29 "array" 30 ); 31 checkTelemetry("DEVTOOLS_RULEVIEW_OPENED_COUNT", "", { 0: 1, 1: 0 }, "array"); 32 checkTelemetry( 33 "DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS", 34 "", 35 null, 36 "hasentries" 37 ); 38 checkTelemetry( 39 "DEVTOOLS_INSPECTOR_TIME_ACTIVE_SECONDS", 40 "", 41 null, 42 "hasentries" 43 ); 44 checkTelemetry( 45 "DEVTOOLS_RULEVIEW_TIME_ACTIVE_SECONDS", 46 "", 47 null, 48 "hasentries" 49 ); 50 checkTelemetry("DEVTOOLS_TOOLBOX_HOST", "", null, "hasentries"); 51 }