Bug 1029433 When in a Loop call, the title bar should display the remote party's information. r=nperriault
This commit is contained in:
@@ -235,8 +235,7 @@ loop.conversation = (function(mozL10n) {
|
||||
);
|
||||
}
|
||||
case "connected": {
|
||||
// XXX This should be the caller id (bug 1020449)
|
||||
document.title = mozL10n.get("incoming_call_title2");
|
||||
document.title = this.props.conversation.getCallIdentifier();
|
||||
|
||||
var callType = this.props.conversation.get("selectedCallType");
|
||||
|
||||
|
||||
@@ -235,8 +235,7 @@ loop.conversation = (function(mozL10n) {
|
||||
);
|
||||
}
|
||||
case "connected": {
|
||||
// XXX This should be the caller id (bug 1020449)
|
||||
document.title = mozL10n.get("incoming_call_title2");
|
||||
document.title = this.props.conversation.getCallIdentifier();
|
||||
|
||||
var callType = this.props.conversation.get("selectedCallType");
|
||||
|
||||
|
||||
@@ -609,6 +609,14 @@ describe("loop.conversation", function() {
|
||||
TestUtils.findRenderedComponentWithType(icView,
|
||||
sharedView.ConversationView);
|
||||
});
|
||||
|
||||
it("should set the title to the call identifier", function() {
|
||||
sandbox.stub(conversation, "getCallIdentifier").returns("fakeId");
|
||||
|
||||
conversation.accepted();
|
||||
|
||||
expect(document.title).eql("fakeId");
|
||||
});
|
||||
});
|
||||
|
||||
describe("session:ended", function() {
|
||||
|
||||
@@ -374,14 +374,24 @@ describe("loop.shared.models", function() {
|
||||
});
|
||||
|
||||
it("should return the callerId", function() {
|
||||
expect(model.getCallIdentifier()).to.eql("mrssmith");
|
||||
expect(model.getCallIdentifier()).eql("mrssmith");
|
||||
});
|
||||
|
||||
it("should return the shorted callUrl if the callerId does not exist",
|
||||
function() {
|
||||
model.set({"callerId": ""});
|
||||
model.set({callerId: ""});
|
||||
|
||||
expect(model.getCallIdentifier()).to.eql("invalid/callToken");
|
||||
expect(model.getCallIdentifier()).eql("invalid/callToken");
|
||||
});
|
||||
|
||||
it("should return an empty string if neither callerId nor callUrl exist",
|
||||
function() {
|
||||
model.set({
|
||||
callerId: undefined,
|
||||
callUrl: undefined
|
||||
});
|
||||
|
||||
expect(model.getCallIdentifier()).eql("");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user