Backed out changeset 0a3385aaff01 (bug 1015988) for mochitest-bc orange.

This commit is contained in:
Ryan VanderMeulen 2014-10-03 16:07:47 -04:00
Родитель 8992905989
Коммит 9140e15c0c
5 изменённых файлов: 2 добавлений и 81 удалений

Просмотреть файл

@ -354,11 +354,7 @@ loop.panel = (function(_, mozL10n) {
},
handleLinkExfiltration: function(event) {
try {
navigator.mozLoop.telemetryAdd("LOOP_CLIENT_CALL_URL_SHARED", true);
} catch (err) {
console.error("Error recording telemetry", err);
}
// TODO Bug 1015988 -- Increase link exfiltration telemetry count
if (this.state.callUrlExpiry) {
navigator.mozLoop.noteCallUrlExpiry(this.state.callUrlExpiry);
}

Просмотреть файл

@ -354,11 +354,7 @@ loop.panel = (function(_, mozL10n) {
},
handleLinkExfiltration: function(event) {
try {
navigator.mozLoop.telemetryAdd("LOOP_CLIENT_CALL_URL_SHARED", true);
} catch (err) {
console.error("Error recording telemetry", err);
}
// TODO Bug 1015988 -- Increase link exfiltration telemetry count
if (this.state.callUrlExpiry) {
navigator.mozLoop.noteCallUrlExpiry(this.state.callUrlExpiry);
}

Просмотреть файл

@ -36,7 +36,6 @@ describe("loop.panel", function() {
copyString: sandbox.stub(),
noteCallUrlExpiry: sinon.spy(),
composeEmail: sinon.spy(),
telemetryAdd: sinon.spy(),
contacts: {
getAll: function(callback) {
callback(null, []);
@ -404,27 +403,6 @@ describe("loop.panel", function() {
6000);
});
it("should call mozLoop.telemetryAdd when the url is copied via button",
function() {
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
notifications: notifications,
client: fakeClient
}));
view.setState({
pending: false,
copied: false,
callUrl: "http://example.com",
callUrlExpiry: 6000
});
TestUtils.Simulate.click(view.getDOMNode().querySelector(".button-copy"));
sinon.assert.calledOnce(navigator.mozLoop.telemetryAdd);
sinon.assert.calledWith(navigator.mozLoop.telemetryAdd,
"LOOP_CLIENT_CALL_URL_SHARED",
true);
});
it("should note the call url expiry when the url is emailed",
function() {
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
@ -445,27 +423,6 @@ describe("loop.panel", function() {
6000);
});
it("should call mozLoop.telemetryAdd when the url is emailed",
function() {
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
notifications: notifications,
client: fakeClient
}));
view.setState({
pending: false,
copied: false,
callUrl: "http://example.com",
callUrlExpiry: 6000
});
TestUtils.Simulate.click(view.getDOMNode().querySelector(".button-email"));
sinon.assert.calledOnce(navigator.mozLoop.telemetryAdd);
sinon.assert.calledWith(navigator.mozLoop.telemetryAdd,
"LOOP_CLIENT_CALL_URL_SHARED",
true);
});
it("should note the call url expiry when the url is copied manually",
function() {
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
@ -487,28 +444,6 @@ describe("loop.panel", function() {
6000);
});
it("should call mozLoop.telemetryAdd when the url is copied manually",
function() {
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
notifications: notifications,
client: fakeClient
}));
view.setState({
pending: false,
copied: false,
callUrl: "http://example.com",
callUrlExpiry: 6000
});
var urlField = view.getDOMNode().querySelector("input[type='url']");
TestUtils.Simulate.copy(urlField);
sinon.assert.calledOnce(navigator.mozLoop.telemetryAdd);
sinon.assert.calledWith(navigator.mozLoop.telemetryAdd,
"LOOP_CLIENT_CALL_URL_SHARED",
true);
});
it("should notify the user when the operation failed", function() {
fakeClient.requestCallUrl = function(_, cb) {
cb("fake error");

Просмотреть файл

@ -13,7 +13,6 @@ add_task(loadLoopPanel);
add_task(function* test_mozLoop_telemetryAdd_boolean() {
for (let histogramId of [
"LOOP_CLIENT_CALL_URL_REQUESTS_SUCCESS",
"LOOP_CLIENT_CALL_URL_SHARED",
]) {
let snapshot = Services.telemetry.getHistogramById(histogramId).snapshot();

Просмотреть файл

@ -6747,11 +6747,6 @@
"kind": "boolean",
"description": "Stores 1 if generating a call URL succeeded, and 0 if it failed."
},
"LOOP_CLIENT_CALL_URL_SHARED": {
"expires_in_version": "never",
"kind": "boolean",
"description": "Stores 1 every time the URL is copied or shared."
},
"E10S_AUTOSTART": {
"expires_in_version": "never",
"kind": "boolean",