Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #26689 from shamenchens/Bug1105124-USSDResponseTex…
Browse files Browse the repository at this point in the history
…t-master

Bug 1105124 - Clear response text when MMI response form is closed, r=gsvelto
  • Loading branch information
shamenchens committed Dec 13, 2014
2 parents 69ae183 + efcb152 commit 5a59bd4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/communications/dialer/js/mmi_ui.js
Expand Up @@ -47,6 +47,7 @@ var MmiUI = {
},

closeWindow: function mui_closeWindow() {
this.resetResponse();
this.mmiScreen.hidden = true;
},

Expand Down
17 changes: 17 additions & 0 deletions apps/communications/dialer/test/unit/mmi_ui_test.js
Expand Up @@ -146,4 +146,21 @@ suite('dialer/mmi UI', function() {
assert.isTrue(MmiUI.sendNode.disabled);
});
});

suite('MMI screen close >', function() {
setup(function() {
var message = 'received ui';
var title = 'Received UI Title';
MmiUI.received({}, message, title);
});

test('Dialer is hidden and response is empty', function() {
MmiUI.closeWindow();

// Message is hidden
assert.isTrue(MmiUI.mmiScreen.hidden);
// Response is empty
assert.equal(MmiUI.responseTextNode.value, '');
});
});
});

0 comments on commit 5a59bd4

Please sign in to comment.