зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1160489 - Enable eslint rules for Loop: comma related. r=Standard8
This commit is contained in:
Родитель
770abc3d6b
Коммит
247ef0c6cb
|
@ -34,8 +34,6 @@
|
|||
|
||||
// Eslint built-in rules are documented at <http://eslint.org/docs/rules/>
|
||||
"camelcase": 0, // TODO: Remove (use default)
|
||||
"comma-dangle": 0, // TODO: Remove (use default)
|
||||
"comma-spacing": 0, // TODO: Remove (use default)
|
||||
"consistent-return": 0, // TODO: Remove (use default)
|
||||
"curly": 0, // TODO: Remove (use default)
|
||||
"dot-notation": 0, // TODO: Remove (use default)
|
||||
|
|
|
@ -115,7 +115,7 @@ loop.Client = (function($) {
|
|||
}
|
||||
}.bind(this)
|
||||
);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
return Client;
|
||||
|
|
|
@ -157,7 +157,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
|
||||
getInitialState: function () {
|
||||
return {
|
||||
openDirUp: false,
|
||||
openDirUp: false
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -175,7 +175,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
if (menuNodeRect.top + menuNodeRect.height >=
|
||||
listNodeRect.top + listNodeRect.height) {
|
||||
this.setState({
|
||||
openDirUp: true,
|
||||
openDirUp: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -232,7 +232,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
const ContactDetail = React.createClass({displayName: "ContactDetail",
|
||||
getInitialState: function() {
|
||||
return {
|
||||
showMenu: false,
|
||||
showMenu: false
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -351,7 +351,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
getInitialState: function() {
|
||||
return {
|
||||
importBusy: false,
|
||||
filter: "",
|
||||
filter: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -633,7 +633,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
pristine: true,
|
||||
name: "",
|
||||
email: "",
|
||||
tel: "",
|
||||
tel: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -651,7 +651,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
handleAcceptButtonClick: function() {
|
||||
// Allow validity error indicators to be displayed.
|
||||
this.setState({
|
||||
pristine: false,
|
||||
pristine: false
|
||||
});
|
||||
|
||||
let emailInput = this.refs.email.getDOMNode();
|
||||
|
@ -677,7 +677,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
}
|
||||
});
|
||||
this.setState({
|
||||
contact: null,
|
||||
contact: null
|
||||
});
|
||||
break;
|
||||
case "add":
|
||||
|
@ -752,6 +752,6 @@ loop.contacts = (function(_, mozL10n) {
|
|||
ContactsList: ContactsList,
|
||||
ContactDetailsForm: ContactDetailsForm,
|
||||
_getPreferred: getPreferred,
|
||||
_setPreferred: setPreferred,
|
||||
_setPreferred: setPreferred
|
||||
};
|
||||
})(_, document.mozL10n);
|
||||
|
|
|
@ -157,7 +157,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
|
||||
getInitialState: function () {
|
||||
return {
|
||||
openDirUp: false,
|
||||
openDirUp: false
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -175,7 +175,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
if (menuNodeRect.top + menuNodeRect.height >=
|
||||
listNodeRect.top + listNodeRect.height) {
|
||||
this.setState({
|
||||
openDirUp: true,
|
||||
openDirUp: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -232,7 +232,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
const ContactDetail = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
showMenu: false,
|
||||
showMenu: false
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -351,7 +351,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
getInitialState: function() {
|
||||
return {
|
||||
importBusy: false,
|
||||
filter: "",
|
||||
filter: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -633,7 +633,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
pristine: true,
|
||||
name: "",
|
||||
email: "",
|
||||
tel: "",
|
||||
tel: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -651,7 +651,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
handleAcceptButtonClick: function() {
|
||||
// Allow validity error indicators to be displayed.
|
||||
this.setState({
|
||||
pristine: false,
|
||||
pristine: false
|
||||
});
|
||||
|
||||
let emailInput = this.refs.email.getDOMNode();
|
||||
|
@ -677,7 +677,7 @@ loop.contacts = (function(_, mozL10n) {
|
|||
}
|
||||
});
|
||||
this.setState({
|
||||
contact: null,
|
||||
contact: null
|
||||
});
|
||||
break;
|
||||
case "add":
|
||||
|
@ -752,6 +752,6 @@ loop.contacts = (function(_, mozL10n) {
|
|||
ContactsList: ContactsList,
|
||||
ContactDetailsForm: ContactDetailsForm,
|
||||
_getPreferred: getPreferred,
|
||||
_setPreferred: setPreferred,
|
||||
_setPreferred: setPreferred
|
||||
};
|
||||
})(_, document.mozL10n);
|
||||
|
|
|
@ -139,7 +139,7 @@ loop.conversation = (function(mozL10n) {
|
|||
loop.store.StoreMixin.register({
|
||||
conversationAppStore: conversationAppStore,
|
||||
conversationStore: conversationStore,
|
||||
feedbackStore: feedbackStore,
|
||||
feedbackStore: feedbackStore
|
||||
});
|
||||
|
||||
// Obtain the windowId and pass it through
|
||||
|
|
|
@ -139,7 +139,7 @@ loop.conversation = (function(mozL10n) {
|
|||
loop.store.StoreMixin.register({
|
||||
conversationAppStore: conversationAppStore,
|
||||
conversationStore: conversationStore,
|
||||
feedbackStore: feedbackStore,
|
||||
feedbackStore: feedbackStore
|
||||
});
|
||||
|
||||
// Obtain the windowId and pass it through
|
||||
|
|
|
@ -153,7 +153,7 @@ loop.conversationViews = (function(mozL10n) {
|
|||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
showMenu: false,
|
||||
showMenu: false
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -285,7 +285,7 @@ loop.conversationViews = (function(mozL10n) {
|
|||
var AcceptCallButton = React.createClass({displayName: "AcceptCallButton",
|
||||
|
||||
propTypes: {
|
||||
mode: React.PropTypes.object.isRequired,
|
||||
mode: React.PropTypes.object.isRequired
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
@ -761,7 +761,7 @@ loop.conversationViews = (function(mozL10n) {
|
|||
return this._renderViewFromCallType();
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
@ -153,7 +153,7 @@ loop.conversationViews = (function(mozL10n) {
|
|||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
showMenu: false,
|
||||
showMenu: false
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -285,7 +285,7 @@ loop.conversationViews = (function(mozL10n) {
|
|||
var AcceptCallButton = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
mode: React.PropTypes.object.isRequired,
|
||||
mode: React.PropTypes.object.isRequired
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
@ -761,7 +761,7 @@ loop.conversationViews = (function(mozL10n) {
|
|||
return this._renderViewFromCallType();
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
window.OTProperties = {
|
||||
cdnURL: 'loop/',
|
||||
cdnURL: 'loop/'
|
||||
};
|
||||
window.OTProperties.assetURL = window.OTProperties.cdnURL + 'sdk-content/';
|
||||
window.OTProperties.configURL = window.OTProperties.assetURL + 'js/dynamic_config.min.js';
|
||||
|
|
|
@ -268,7 +268,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
React.createElement("a", {href: privacy_notice_url, target: "_blank"},
|
||||
mozL10n.get("legal_text_privacy")
|
||||
)
|
||||
),
|
||||
)
|
||||
});
|
||||
return (
|
||||
React.createElement("div", {id: "powered-by-wrapper"},
|
||||
|
@ -759,7 +759,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
getInitialState: function() {
|
||||
return {
|
||||
userProfile: this.props.userProfile || this.props.mozLoop.userProfile,
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen"),
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen")
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -772,7 +772,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
var firstErrorKey = Object.keys(this.props.mozLoop.errors)[0];
|
||||
return {
|
||||
type: firstErrorKey,
|
||||
error: this.props.mozLoop.errors[firstErrorKey],
|
||||
error: this.props.mozLoop.errors[firstErrorKey]
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -785,7 +785,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
message: serviceError.error.friendlyMessage,
|
||||
details: serviceError.error.friendlyDetails,
|
||||
detailsButtonLabel: serviceError.error.friendlyDetailsButtonLabel,
|
||||
detailsButtonCallback: serviceError.error.friendlyDetailsButtonCallback,
|
||||
detailsButtonCallback: serviceError.error.friendlyDetailsButtonCallback
|
||||
});
|
||||
} else {
|
||||
this.props.notifications.remove(this.props.notifications.get("service-error"));
|
||||
|
@ -806,7 +806,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
|
||||
_gettingStartedSeen: function() {
|
||||
this.setState({
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen"),
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen")
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -959,7 +959,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
RoomList: RoomList,
|
||||
SettingsDropdown: SettingsDropdown,
|
||||
ToSView: ToSView,
|
||||
UserIdentity: UserIdentity,
|
||||
UserIdentity: UserIdentity
|
||||
};
|
||||
})(_, document.mozL10n);
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
<a href={privacy_notice_url} target="_blank">
|
||||
{mozL10n.get("legal_text_privacy")}
|
||||
</a>
|
||||
),
|
||||
)
|
||||
});
|
||||
return (
|
||||
<div id="powered-by-wrapper">
|
||||
|
@ -759,7 +759,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
getInitialState: function() {
|
||||
return {
|
||||
userProfile: this.props.userProfile || this.props.mozLoop.userProfile,
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen"),
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen")
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -772,7 +772,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
var firstErrorKey = Object.keys(this.props.mozLoop.errors)[0];
|
||||
return {
|
||||
type: firstErrorKey,
|
||||
error: this.props.mozLoop.errors[firstErrorKey],
|
||||
error: this.props.mozLoop.errors[firstErrorKey]
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -785,7 +785,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
message: serviceError.error.friendlyMessage,
|
||||
details: serviceError.error.friendlyDetails,
|
||||
detailsButtonLabel: serviceError.error.friendlyDetailsButtonLabel,
|
||||
detailsButtonCallback: serviceError.error.friendlyDetailsButtonCallback,
|
||||
detailsButtonCallback: serviceError.error.friendlyDetailsButtonCallback
|
||||
});
|
||||
} else {
|
||||
this.props.notifications.remove(this.props.notifications.get("service-error"));
|
||||
|
@ -806,7 +806,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
|
||||
_gettingStartedSeen: function() {
|
||||
this.setState({
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen"),
|
||||
gettingStartedSeen: this.props.mozLoop.getLoopPref("gettingStarted.seen")
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -959,7 +959,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
RoomList: RoomList,
|
||||
SettingsDropdown: SettingsDropdown,
|
||||
ToSView: ToSView,
|
||||
UserIdentity: UserIdentity,
|
||||
UserIdentity: UserIdentity
|
||||
};
|
||||
})(_, document.mozL10n);
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ loop.store = loop.store || {};
|
|||
error: null,
|
||||
pendingCreation: false,
|
||||
pendingInitialRetrieval: false,
|
||||
rooms: [],
|
||||
rooms: []
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -258,7 +258,7 @@ loop.store = loop.store || {};
|
|||
createRoom: function(actionData) {
|
||||
this.setStoreState({
|
||||
pendingCreation: true,
|
||||
error: null,
|
||||
error: null
|
||||
});
|
||||
|
||||
var roomCreationData = {
|
||||
|
|
|
@ -129,7 +129,7 @@ loop.roomViews = (function(mozL10n) {
|
|||
|
||||
mozL10n.get("share_panel_body", {
|
||||
brandShortname: mozL10n.get("brandShortname"),
|
||||
clientSuperShortname: mozL10n.get("clientSuperShortname"),
|
||||
clientSuperShortname: mozL10n.get("clientSuperShortname")
|
||||
})
|
||||
|
||||
),
|
||||
|
|
|
@ -129,7 +129,7 @@ loop.roomViews = (function(mozL10n) {
|
|||
{
|
||||
mozL10n.get("share_panel_body", {
|
||||
brandShortname: mozL10n.get("brandShortname"),
|
||||
clientSuperShortname: mozL10n.get("clientSuperShortname"),
|
||||
clientSuperShortname: mozL10n.get("clientSuperShortname")
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -252,7 +252,7 @@ loop.shared.actions = (function() {
|
|||
// The localized template to use to name the new room
|
||||
// (eg. "Conversation {{conversationLabel}}").
|
||||
nameTemplate: String,
|
||||
roomOwner: String,
|
||||
roomOwner: String
|
||||
// See https://wiki.mozilla.org/Loop/Architecture/Context#Format_of_context.value
|
||||
// urls: Object - Optional
|
||||
}),
|
||||
|
|
|
@ -565,7 +565,7 @@ loop.store.ActiveRoomStore = (function() {
|
|||
constraints: {
|
||||
browserWindow: windowId,
|
||||
scrollWithPage: true
|
||||
},
|
||||
}
|
||||
};
|
||||
this._sdkDriver.startScreenShare(options);
|
||||
} else if (screenSharingState === SCREEN_SHARE_STATES.ACTIVE) {
|
||||
|
|
|
@ -186,7 +186,7 @@ loop.shared.mixins = (function() {
|
|||
|
||||
toggleDropdownMenu: function() {
|
||||
this[this.state.showMenu ? "hideDropdownMenu" : "showDropdownMenu"]();
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -517,7 +517,7 @@ loop.shared.mixins = (function() {
|
|||
width: "100%",
|
||||
height: "100%",
|
||||
publishVideo: options.publishVideo,
|
||||
showControls: false,
|
||||
showControls: false
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ loop.shared.models = (function(l10n) {
|
|||
this._signalEnd("session:peer-hungup", event);
|
||||
}
|
||||
this.endSession();
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -88,7 +88,7 @@ loop.shared.views = (function(_, l10n) {
|
|||
propTypes: {
|
||||
dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
|
||||
visible: React.PropTypes.bool.isRequired,
|
||||
state: React.PropTypes.string.isRequired,
|
||||
state: React.PropTypes.string.isRequired
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
@ -199,7 +199,7 @@ loop.shared.views = (function(_, l10n) {
|
|||
hangup: React.PropTypes.func.isRequired,
|
||||
publishStream: React.PropTypes.func.isRequired,
|
||||
hangupButtonLabel: React.PropTypes.string,
|
||||
enableHangup: React.PropTypes.bool,
|
||||
enableHangup: React.PropTypes.bool
|
||||
},
|
||||
|
||||
handleClickHangup: function() {
|
||||
|
@ -560,14 +560,14 @@ loop.shared.views = (function(_, l10n) {
|
|||
onClick: React.PropTypes.func.isRequired,
|
||||
disabled: React.PropTypes.bool,
|
||||
additionalClass: React.PropTypes.string,
|
||||
htmlId: React.PropTypes.string,
|
||||
htmlId: React.PropTypes.string
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
disabled: false,
|
||||
additionalClass: "",
|
||||
htmlId: "",
|
||||
htmlId: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -596,7 +596,7 @@ loop.shared.views = (function(_, l10n) {
|
|||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
additionalClass: "",
|
||||
additionalClass: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ loop.shared.views = (function(_, l10n) {
|
|||
propTypes: {
|
||||
dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
|
||||
visible: React.PropTypes.bool.isRequired,
|
||||
state: React.PropTypes.string.isRequired,
|
||||
state: React.PropTypes.string.isRequired
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
@ -199,7 +199,7 @@ loop.shared.views = (function(_, l10n) {
|
|||
hangup: React.PropTypes.func.isRequired,
|
||||
publishStream: React.PropTypes.func.isRequired,
|
||||
hangupButtonLabel: React.PropTypes.string,
|
||||
enableHangup: React.PropTypes.bool,
|
||||
enableHangup: React.PropTypes.bool
|
||||
},
|
||||
|
||||
handleClickHangup: function() {
|
||||
|
@ -560,14 +560,14 @@ loop.shared.views = (function(_, l10n) {
|
|||
onClick: React.PropTypes.func.isRequired,
|
||||
disabled: React.PropTypes.bool,
|
||||
additionalClass: React.PropTypes.string,
|
||||
htmlId: React.PropTypes.string,
|
||||
htmlId: React.PropTypes.string
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
disabled: false,
|
||||
additionalClass: "",
|
||||
htmlId: "",
|
||||
htmlId: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -596,7 +596,7 @@ loop.shared.views = (function(_, l10n) {
|
|||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
additionalClass: "",
|
||||
additionalClass: ""
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
@ -462,7 +462,7 @@ this.GoogleImporter.prototype = {
|
|||
let addressNodes = entry.getElementsByTagNameNS(kNS_GD, "structuredPostalAddress");
|
||||
if (addressNodes.length) {
|
||||
contact.adr = [];
|
||||
for (let [,addressNode] of Iterator(addressNodes)) {
|
||||
for (let [, addressNode] of Iterator(addressNodes)) {
|
||||
let adr = extractFieldsFromNode(new Map([
|
||||
["countryName", "country"],
|
||||
["locality", "city"],
|
||||
|
@ -482,7 +482,7 @@ this.GoogleImporter.prototype = {
|
|||
let emailNodes = entry.getElementsByTagNameNS(kNS_GD, "email");
|
||||
if (emailNodes.length) {
|
||||
contact.email = [];
|
||||
for (let [,emailNode] of Iterator(emailNodes)) {
|
||||
for (let [, emailNode] of Iterator(emailNodes)) {
|
||||
contact.email.push({
|
||||
pref: (emailNode.getAttribute("primary") == "true"),
|
||||
type: [getFieldType(emailNode)],
|
||||
|
@ -495,7 +495,7 @@ this.GoogleImporter.prototype = {
|
|||
let phoneNodes = entry.getElementsByTagNameNS(kNS_GD, "phoneNumber");
|
||||
if (phoneNodes.length) {
|
||||
contact.tel = [];
|
||||
for (let [,phoneNode] of Iterator(phoneNodes)) {
|
||||
for (let [, phoneNode] of Iterator(phoneNodes)) {
|
||||
let phoneNumber = phoneNode.hasAttribute("uri") ?
|
||||
phoneNode.getAttribute("uri").replace("tel:", "") :
|
||||
phoneNode.textContent;
|
||||
|
@ -511,7 +511,7 @@ this.GoogleImporter.prototype = {
|
|||
if (orgNodes.length) {
|
||||
contact.org = [];
|
||||
contact.jobTitle = [];
|
||||
for (let [,orgNode] of Iterator(orgNodes)) {
|
||||
for (let [, orgNode] of Iterator(orgNodes)) {
|
||||
let orgElement = orgNode.getElementsByTagNameNS(kNS_GD, "orgName")[0];
|
||||
let titleElement = orgNode.getElementsByTagNameNS(kNS_GD, "orgTitle")[0];
|
||||
contact.org.push(orgElement ? orgElement.textContent : "");
|
||||
|
|
|
@ -94,7 +94,7 @@ CallProgressSocket.prototype = {
|
|||
let helloMsg = {
|
||||
messageType: "hello",
|
||||
callId: this._callId,
|
||||
auth: this._token,
|
||||
auth: this._token
|
||||
};
|
||||
try { // in case websocket has closed before this handler is run
|
||||
this._websocket.sendMsg(JSON.stringify(helloMsg));
|
||||
|
@ -182,7 +182,7 @@ CallProgressSocket.prototype = {
|
|||
event: "terminate",
|
||||
reason: "busy"
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -194,7 +194,7 @@ CallProgressSocket.prototype = {
|
|||
*/
|
||||
let LoopCallsInternal = {
|
||||
mocks: {
|
||||
webSocket: undefined,
|
||||
webSocket: undefined
|
||||
},
|
||||
|
||||
conversationInProgress: {},
|
||||
|
|
|
@ -207,7 +207,7 @@ PushSocket.prototype = {
|
|||
this._websocket.close(this._websocket.CLOSE_NORMAL);
|
||||
}
|
||||
catch (e) {}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -260,7 +260,7 @@ RetryManager.prototype = {
|
|||
clearTimeout(this._timeoutID);
|
||||
this._timeoutID = null;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -313,7 +313,7 @@ PingMonitor.prototype = {
|
|||
consoleLog.info("PushHandler: ping sent");
|
||||
this._pingTimerID = setTimeout(this._onTimeout, this._pingTimeout);
|
||||
this._pingFunc();
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -870,5 +870,5 @@ let MozLoopPushHandler = {
|
|||
this._pushSocket.send({messageType: "register",
|
||||
channelID: channelID});
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ const INVALID_AUTH_TOKEN = 110;
|
|||
|
||||
const LOOP_SESSION_TYPE = {
|
||||
GUEST: 1,
|
||||
FXA: 2,
|
||||
FXA: 2
|
||||
};
|
||||
|
||||
/***
|
||||
|
@ -26,7 +26,7 @@ const TWO_WAY_MEDIA_CONN_LENGTH = {
|
|||
SHORTER_THAN_10S: 0,
|
||||
BETWEEN_10S_AND_30S: 1,
|
||||
BETWEEN_30S_AND_5M: 2,
|
||||
MORE_THAN_5M: 3,
|
||||
MORE_THAN_5M: 3
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -123,7 +123,7 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
|
|||
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/Console.jsm", {}).ConsoleAPI;
|
||||
let consoleOptions = {
|
||||
maxLogLevel: Services.prefs.getCharPref(PREF_LOG_LEVEL).toLowerCase(),
|
||||
prefix: "Loop",
|
||||
prefix: "Loop"
|
||||
};
|
||||
return new ConsoleAPI(consoleOptions);
|
||||
});
|
||||
|
@ -159,7 +159,7 @@ let MozLoopServiceInternal = {
|
|||
pushURLs: new Map(),
|
||||
|
||||
mocks: {
|
||||
pushHandler: undefined,
|
||||
pushHandler: undefined
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -275,7 +275,7 @@ let MozLoopServiceInternal = {
|
|||
Cr.NS_ERROR_OFFLINE,
|
||||
Cr.NS_ERROR_PROXY_CONNECTION_REFUSED,
|
||||
Cr.NS_ERROR_UNKNOWN_HOST,
|
||||
Cr.NS_ERROR_UNKNOWN_PROXY_HOST,
|
||||
Cr.NS_ERROR_UNKNOWN_PROXY_HOST
|
||||
];
|
||||
|
||||
if (error.code === null && error.errno === null &&
|
||||
|
@ -765,7 +765,7 @@ let MozLoopServiceInternal = {
|
|||
|
||||
let ai = Services.appinfo;
|
||||
let uuid = uuidgen.generateUUID().toString();
|
||||
uuid = uuid.substr(1,uuid.length-2); // remove uuid curly braces
|
||||
uuid = uuid.substr(1, uuid.length-2); // remove uuid curly braces
|
||||
|
||||
let directory = OS.Path.join(OS.Constants.Path.profileDir,
|
||||
"saved-telemetry-pings");
|
||||
|
@ -964,7 +964,7 @@ let MozLoopServiceInternal = {
|
|||
|
||||
try {
|
||||
gFxAOAuthClient = new FxAccountsOAuthClient({
|
||||
parameters: parameters,
|
||||
parameters: parameters
|
||||
});
|
||||
} catch (ex) {
|
||||
gFxAOAuthClientPromise = null;
|
||||
|
@ -1020,7 +1020,7 @@ let MozLoopServiceInternal = {
|
|||
|
||||
let payload = {
|
||||
code: code,
|
||||
state: state,
|
||||
state: state
|
||||
};
|
||||
return this.hawkRequestInternal(LOOP_SESSION_TYPE.FXA, "/fxa-oauth/token", "POST", payload).then(response => {
|
||||
return JSON.parse(response.body);
|
||||
|
@ -1052,7 +1052,7 @@ let MozLoopServiceInternal = {
|
|||
_fxAOAuthError: function(deferred, err) {
|
||||
gFxAOAuthClientPromise = null;
|
||||
deferred.reject(err);
|
||||
},
|
||||
}
|
||||
};
|
||||
Object.freeze(MozLoopServiceInternal);
|
||||
|
||||
|
@ -1079,7 +1079,7 @@ this.MozLoopService = {
|
|||
return {
|
||||
callsFxA: "25389583-921f-4169-a426-a4673658944b",
|
||||
roomsFxA: "6add272a-d316-477c-8335-f00f73dfde71",
|
||||
roomsGuest: "19d3f799-a8f3-4328-9822-b7cd02765832",
|
||||
roomsGuest: "19d3f799-a8f3-4328-9822-b7cd02765832"
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -1621,7 +1621,7 @@ this.MozLoopService = {
|
|||
}
|
||||
|
||||
let url = this.getTourURL("resume-with-conversation", {
|
||||
incomingConversation: aIncomingConversationState,
|
||||
incomingConversation: aIncomingConversationState
|
||||
});
|
||||
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
|
@ -1632,14 +1632,14 @@ this.MozLoopService = {
|
|||
// already open so we ignore the fragment and query string.
|
||||
let hadExistingTab = win.switchToTabHavingURI(url, true, {
|
||||
ignoreFragment: true,
|
||||
ignoreQueryString: true,
|
||||
ignoreQueryString: true
|
||||
});
|
||||
|
||||
// If the tab was already open, send an event instead of using the query
|
||||
// parameter above (that we don't replace on existing tabs to avoid a reload).
|
||||
if (hadExistingTab) {
|
||||
UITour.notify("Loop:IncomingConversation", {
|
||||
conversationOpen: aIncomingConversationState === "open",
|
||||
conversationOpen: aIncomingConversationState === "open"
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -1655,7 +1655,7 @@ this.MozLoopService = {
|
|||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
win.switchToTabHavingURI(url, true, {
|
||||
ignoreFragment: true,
|
||||
replaceQueryString: true,
|
||||
replaceQueryString: true
|
||||
});
|
||||
} catch (ex) {
|
||||
log.error("Error opening Getting Started tour", ex);
|
||||
|
|
|
@ -124,7 +124,7 @@ loop.standaloneMedia = (function() {
|
|||
localStream: null,
|
||||
pending: false,
|
||||
errorCallbacks: [],
|
||||
successCallbacks: [],
|
||||
successCallbacks: []
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -145,6 +145,6 @@ loop.standaloneMedia = (function() {
|
|||
_MultiplexGum: _MultiplexGum,
|
||||
setSingleton: function(singleton) {
|
||||
singletonMultiplexGum = singleton;
|
||||
},
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
@ -128,7 +128,7 @@ loop.StandaloneClient = (function($) {
|
|||
}.bind(this));
|
||||
|
||||
req.fail(this._failureHandler.bind(this, cb));
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
return StandaloneClient;
|
||||
|
|
|
@ -205,7 +205,7 @@ loop.standaloneRoomViews = (function(mozL10n) {
|
|||
React.createElement("a", {href: loop.config.privacyWebsiteUrl, target: "_blank"},
|
||||
mozL10n.get("privacy_notice_link_text")
|
||||
)
|
||||
),
|
||||
)
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -576,7 +576,7 @@ loop.standaloneRoomViews = (function(mozL10n) {
|
|||
var screenShareStreamClasses = React.addons.classSet({
|
||||
"screen": true,
|
||||
"focus-stream": this.state.receivingScreenShare,
|
||||
hide: !this.state.receivingScreenShare,
|
||||
hide: !this.state.receivingScreenShare
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
|
@ -205,7 +205,7 @@ loop.standaloneRoomViews = (function(mozL10n) {
|
|||
<a href={loop.config.privacyWebsiteUrl} target="_blank">
|
||||
{mozL10n.get("privacy_notice_link_text")}
|
||||
</a>
|
||||
),
|
||||
)
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -576,7 +576,7 @@ loop.standaloneRoomViews = (function(mozL10n) {
|
|||
var screenShareStreamClasses = React.addons.classSet({
|
||||
"screen": true,
|
||||
"focus-stream": this.state.receivingScreenShare,
|
||||
hide: !this.state.receivingScreenShare,
|
||||
hide: !this.state.receivingScreenShare
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
|
@ -858,7 +858,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
|
|||
this._websocket = new loop.CallConnectionWebSocket({
|
||||
url: this.props.conversation.get("progressURL"),
|
||||
websocketToken: this.props.conversation.get("websocketToken"),
|
||||
callId: this.props.conversation.get("callId"),
|
||||
callId: this.props.conversation.get("callId")
|
||||
});
|
||||
this._websocket.promiseConnect().then(function() {
|
||||
}.bind(this), function() {
|
||||
|
@ -930,7 +930,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
|
|||
if (this.state.callStatus !== "failure") {
|
||||
this.setState({callStatus: "end"});
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -858,7 +858,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
|
|||
this._websocket = new loop.CallConnectionWebSocket({
|
||||
url: this.props.conversation.get("progressURL"),
|
||||
websocketToken: this.props.conversation.get("websocketToken"),
|
||||
callId: this.props.conversation.get("callId"),
|
||||
callId: this.props.conversation.get("callId")
|
||||
});
|
||||
this._websocket.promiseConnect().then(function() {
|
||||
}.bind(this), function() {
|
||||
|
@ -930,7 +930,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
|
|||
if (this.state.callStatus !== "failure") {
|
||||
this.setState({callStatus: "end"});
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,7 +32,7 @@ describe("loop.contacts", function() {
|
|||
category: ["google"],
|
||||
published: 1406798311748,
|
||||
updated: 1406798311748
|
||||
},{
|
||||
}, {
|
||||
id: 2,
|
||||
_guid: 2,
|
||||
name: ["Bob Banana"],
|
||||
|
@ -118,7 +118,7 @@ describe("loop.contacts", function() {
|
|||
};
|
||||
|
||||
fakeWindow = {
|
||||
close: sandbox.stub(),
|
||||
close: sandbox.stub()
|
||||
};
|
||||
loop.shared.mixins.setRootObject(fakeWindow);
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ describe("loop.conversation", function() {
|
|||
}});
|
||||
|
||||
roomStore = new loop.store.RoomStore(dispatcher, {
|
||||
mozLoop: navigator.mozLoop,
|
||||
mozLoop: navigator.mozLoop
|
||||
});
|
||||
conversationAppStore = new loop.store.ConversationAppStore({
|
||||
dispatcher: dispatcher,
|
||||
|
|
|
@ -801,7 +801,7 @@ describe("loop.panel", function() {
|
|||
location: "http://invalid.com",
|
||||
description: "fakeSite",
|
||||
thumbnail: "fakeimage.png"
|
||||
}],
|
||||
}]
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ describe("loop.store.RoomStore", function () {
|
|||
rooms: [{
|
||||
decryptedContext: {
|
||||
roomName: "RoomWord 99"
|
||||
},
|
||||
}
|
||||
}, {
|
||||
decryptedContext: {
|
||||
roomName: "RoomWord 98"
|
||||
|
@ -269,7 +269,7 @@ describe("loop.store.RoomStore", function () {
|
|||
location: "http://invalid.com",
|
||||
description: "fakeSite",
|
||||
thumbnail: "fakeimage.png"
|
||||
}],
|
||||
}]
|
||||
},
|
||||
roomOwner: fakeOwner,
|
||||
maxSize: store.maxRoomCreationSize
|
||||
|
|
|
@ -81,7 +81,7 @@ let vcards = [
|
|||
"EMAIL:anyone@example.com\n" +
|
||||
"REV:2011-07-12T14:43:20Z\n" +
|
||||
"UID:pid8\n" +
|
||||
"END:VCARD\n",
|
||||
"END:VCARD\n"
|
||||
];
|
||||
|
||||
|
||||
|
@ -319,7 +319,7 @@ add_task(function* test_CardDavImport() {
|
|||
error = yield new Promise ((resolve, reject) => {
|
||||
info("Initiating import");
|
||||
importer.startImport({
|
||||
"host": "example.com",
|
||||
"host": "example.com"
|
||||
}, (err, result) => { err ? resolve(err) : reject(new Error("Should have failed")); }, mockDb);
|
||||
});
|
||||
Assert.equal(error.message, "No authentication specified", "Missing parameters should generate error");
|
||||
|
|
|
@ -26,7 +26,7 @@ const kContacts = [{
|
|||
category: ["google"],
|
||||
published: 1406798311748,
|
||||
updated: 1406798311748
|
||||
},{
|
||||
}, {
|
||||
id: 2,
|
||||
name: ["Bob Banana"],
|
||||
email: [{
|
||||
|
|
|
@ -60,7 +60,7 @@ add_task(function* checkOAuthParams() {
|
|||
content_uri: BASE_URL + "/content",
|
||||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
state: "state"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
let client = yield MozLoopServiceInternal.promiseFxAOAuthClient();
|
||||
|
@ -108,7 +108,7 @@ add_task(function* params_no_hawk_session() {
|
|||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
test_error: "params_no_hawk",
|
||||
test_error: "params_no_hawk"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
|
||||
|
@ -153,7 +153,7 @@ add_task(function* invalidState() {
|
|||
content_uri: BASE_URL + "/content",
|
||||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "invalid_state",
|
||||
state: "invalid_state"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
let loginPromise = MozLoopService.logInToFxA();
|
||||
|
@ -180,7 +180,7 @@ add_task(function* basicRegistration() {
|
|||
content_uri: BASE_URL + "/content",
|
||||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
state: "state"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
yield resetFxA();
|
||||
|
@ -201,7 +201,7 @@ add_task(function* registrationWithInvalidState() {
|
|||
content_uri: BASE_URL + "/content",
|
||||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "invalid_state",
|
||||
state: "invalid_state"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
|
||||
|
@ -228,7 +228,7 @@ add_task(function* registrationWith401() {
|
|||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
test_error: "token_401",
|
||||
test_error: "token_401"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
|
||||
|
@ -277,7 +277,7 @@ add_task(function* basicAuthorizationAndRegistration() {
|
|||
content_uri: BASE_URL + "/content",
|
||||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
state: "state"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
|
||||
|
@ -340,7 +340,7 @@ add_task(function* loginWithParams401() {
|
|||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
test_error: "params_401",
|
||||
test_error: "params_401"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
yield MozLoopService.promiseRegisteredWithServers();
|
||||
|
@ -402,7 +402,7 @@ add_task(function* loginWithRegistration401() {
|
|||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
test_error: "token_401",
|
||||
test_error: "token_401"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
|
||||
|
@ -432,7 +432,7 @@ add_task(function* openFxASettings() {
|
|||
oauth_uri: BASE_URL + "/oauth",
|
||||
profile_uri: BASE_URL + "/profile",
|
||||
state: "state",
|
||||
test_error: "token_401",
|
||||
test_error: "token_401"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
|
||||
|
@ -448,7 +448,7 @@ add_task(function* openFxASettings() {
|
|||
is(aBrowser.currentURI.spec, Services.io.newURI("/settings", null, contentURI).spec,
|
||||
"Check settings tab URL");
|
||||
resolve();
|
||||
},
|
||||
}
|
||||
};
|
||||
gBrowser.addTabsProgressListener(progressListener);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ add_task(function* required_setup_params() {
|
|||
content_uri: "https://example.com/content/",
|
||||
oauth_uri: "https://example.com/oauth/",
|
||||
profile_uri: "https://example.com/profile/",
|
||||
state: "my_state",
|
||||
state: "my_state"
|
||||
};
|
||||
let request = yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
is(request.status, 200, "Check /setup_params status");
|
||||
|
@ -38,7 +38,7 @@ add_task(function* optional_setup_params() {
|
|||
oauth_uri: "https://example.com/oauth/",
|
||||
profile_uri: "https://example.com/profile/",
|
||||
scope: "profile",
|
||||
state: "my_state",
|
||||
state: "my_state"
|
||||
};
|
||||
let request = yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
is(request.status, 200, "Check /setup_params status");
|
||||
|
@ -63,7 +63,7 @@ add_task(function* token_request() {
|
|||
content_uri: "https://example.com/content/",
|
||||
oauth_uri: "https://example.com/oauth/",
|
||||
profile_uri: "https://example.com/profile/",
|
||||
state: "my_state",
|
||||
state: "my_state"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
|
||||
|
@ -80,7 +80,7 @@ add_task(function* token_request_invalid_state() {
|
|||
content_uri: "https://example.com/content/",
|
||||
oauth_uri: "https://example.com/oauth/",
|
||||
profile_uri: "https://example.com/profile/",
|
||||
state: "my_invalid_state",
|
||||
state: "my_invalid_state"
|
||||
};
|
||||
yield promiseOAuthParamsSetup(BASE_URL, params);
|
||||
let request = yield promiseToken("my_code", "my_state");
|
||||
|
@ -120,7 +120,7 @@ function promiseToken(code, state) {
|
|||
xhr.addEventListener("error", reject);
|
||||
let payload = {
|
||||
code: code,
|
||||
state: state,
|
||||
state: state
|
||||
};
|
||||
xhr.send(JSON.stringify(payload, null, 4));
|
||||
});
|
||||
|
|
|
@ -756,7 +756,7 @@ describe("loop.store.ActiveRoomStore", function () {
|
|||
|
||||
store.setupWindowData(new sharedActions.SetupWindowData({
|
||||
windowId: "42",
|
||||
type: "room",
|
||||
type: "room"
|
||||
}));
|
||||
|
||||
store.joinedRoom(actionData);
|
||||
|
|
|
@ -1056,7 +1056,7 @@ describe("loop.store.ConversationStore", function () {
|
|||
|
||||
store._websocket.trigger("progress", {
|
||||
state: WS_STATES.TERMINATED,
|
||||
reason: WEBSOCKET_REASONS.REJECT,
|
||||
reason: WEBSOCKET_REASONS.REJECT
|
||||
});
|
||||
|
||||
sinon.assert.calledOnce(dispatcher.dispatch);
|
||||
|
|
|
@ -188,7 +188,7 @@ describe("loop.shared.models", function() {
|
|||
model.set({
|
||||
windowId: "28",
|
||||
sessionId: "321456",
|
||||
callId: "142536",
|
||||
callId: "142536"
|
||||
});
|
||||
model.startSession();
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ describe("loop.standaloneMedia._MultiplexGum", function() {
|
|||
localStream: null,
|
||||
pending: false,
|
||||
errorCallbacks: [],
|
||||
successCallbacks: [],
|
||||
successCallbacks: []
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ MockWebSocketChannel.prototype = {
|
|||
|
||||
serverClose: function (err) {
|
||||
this.listener.onServerClose(this.context, err || -1);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
const extend = function(target, source) {
|
||||
|
|
|
@ -161,7 +161,7 @@ const kRoomUpdates = {
|
|||
|
||||
const kCreateRoomProps = {
|
||||
decryptedContext: {
|
||||
roomName: "UX Discussion",
|
||||
roomName: "UX Discussion"
|
||||
},
|
||||
roomOwner: "Alexis",
|
||||
maxSize: 2
|
||||
|
@ -428,7 +428,7 @@ add_task(function* test_openRoom() {
|
|||
// Test if the rooms cache is refreshed after FxA signin or signout.
|
||||
add_task(function* test_refresh() {
|
||||
// XXX Temporarily whilst FxA encryption isn't handled (bug 1153788).
|
||||
Array.prototype.push.apply(gExpectedAdds, [...kExpectedRooms.values()].slice(1,3));
|
||||
Array.prototype.push.apply(gExpectedAdds, [...kExpectedRooms.values()].slice(1, 3));
|
||||
gExpectedRefresh = true;
|
||||
|
||||
// Make the switch.
|
||||
|
|
|
@ -56,7 +56,7 @@ const kExpectedRooms = new Map([
|
|||
alg: "AES-GCM"
|
||||
},
|
||||
decryptedContext: {
|
||||
roomName: "Loopy Discussion",
|
||||
roomName: "Loopy Discussion"
|
||||
},
|
||||
roomKey: "h2H8Sa9QxLCTTiXNmJVtRA",
|
||||
roomToken: "QzBbvGmIZWU",
|
||||
|
@ -66,7 +66,7 @@ const kExpectedRooms = new Map([
|
|||
|
||||
const kCreateRoomProps = {
|
||||
decryptedContext: {
|
||||
roomName: "Say Hello",
|
||||
roomName: "Say Hello"
|
||||
},
|
||||
roomOwner: "Gavin",
|
||||
maxSize: 2
|
||||
|
|
|
@ -39,7 +39,7 @@ const kRoomsResponses = new Map([
|
|||
roomUrl: "http://localhost:3000/rooms/QzBbvGmIZWU",
|
||||
maxSize: 2,
|
||||
ctime: 140551741
|
||||
}],
|
||||
}]
|
||||
]);
|
||||
|
||||
let gRoomsAdded = [];
|
||||
|
|
|
@ -54,7 +54,11 @@ function run_test() {
|
|||
|
||||
// Setup fake login state so we get FxA requests.
|
||||
const MozLoopServiceInternal = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}).MozLoopServiceInternal;
|
||||
MozLoopServiceInternal.fxAOAuthTokenData = {token_type:"bearer",access_token:"1bad3e44b12f77a88fe09f016f6a37c42e40f974bc7a8b432bb0d2f0e37e1752",scope:"profile"};
|
||||
MozLoopServiceInternal.fxAOAuthTokenData = {
|
||||
token_type:"bearer",
|
||||
access_token:"1bad3e44b12f77a88fe09f016f6a37c42e40f974bc7a8b432bb0d2f0e37e1752",
|
||||
scope:"profile"
|
||||
};
|
||||
MozLoopServiceInternal.fxAOAuthProfile = {email: "test@example.com", uid: "abcd1234"};
|
||||
|
||||
let mockWebSocket = new MockWebSocketChannel();
|
||||
|
@ -83,7 +87,7 @@ function run_test() {
|
|||
progressURL: "wss://localhost:5000/websocket"}]},
|
||||
{calls: [{callId: secondCallId,
|
||||
websocketToken: "1deadbeef1",
|
||||
progressURL: "wss://localhost:5000/websocket"}]},
|
||||
progressURL: "wss://localhost:5000/websocket"}]}
|
||||
];
|
||||
|
||||
loopServer.registerPathHandler("/registration", (request, response) => {
|
||||
|
|
|
@ -23,7 +23,7 @@ function errorRequestHandler(request, response) {
|
|||
code: parseInt(responseCode),
|
||||
errno: INVALID_AUTH_TOKEN,
|
||||
error: "INVALID_AUTH_TOKEN",
|
||||
message: "INVALID_AUTH_TOKEN",
|
||||
message: "INVALID_AUTH_TOKEN"
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ add_task(function* test_initialize_with_invalid_fxa_token() {
|
|||
code: 401,
|
||||
errno: 110,
|
||||
error: "Unauthorized",
|
||||
message: "Unknown credentials",
|
||||
message: "Unknown credentials"
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ add_test(function test_registration_invalid_token() {
|
|||
code: 401,
|
||||
errno: 110,
|
||||
error: "Unauthorized",
|
||||
message: "Unknown credentials",
|
||||
message: "Unknown credentials"
|
||||
}));
|
||||
} else {
|
||||
// We didn't have an authorization header, so check the pref has been cleared.
|
||||
|
|
|
@ -38,7 +38,7 @@ var fakeRooms = [
|
|||
{
|
||||
"roomToken": "3jKS_Els9IU",
|
||||
"decryptedContext": {
|
||||
"roomName": "UX Discussion",
|
||||
"roomName": "UX Discussion"
|
||||
},
|
||||
"roomUrl": "http://localhost:3000/rooms/3jKS_Els9IU",
|
||||
"roomOwner": "Alexis",
|
||||
|
@ -71,7 +71,7 @@ var fakeContacts = [{
|
|||
category: ["google"],
|
||||
published: 1406798311748,
|
||||
updated: 1406798311748
|
||||
},{
|
||||
}, {
|
||||
id: 2,
|
||||
_guid: 2,
|
||||
name: ["Bob Banana"],
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
level: "error",
|
||||
message: "Could Not Authenticate",
|
||||
details: "Did you change your password?",
|
||||
detailsButtonLabel: "Retry",
|
||||
detailsButtonLabel: "Retry"
|
||||
});
|
||||
|
||||
var SVGIcon = React.createClass({displayName: "SVGIcon",
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
level: "error",
|
||||
message: "Could Not Authenticate",
|
||||
details: "Did you change your password?",
|
||||
detailsButtonLabel: "Retry",
|
||||
detailsButtonLabel: "Retry"
|
||||
});
|
||||
|
||||
var SVGIcon = React.createClass({
|
||||
|
|
Загрузка…
Ссылка в новой задаче