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

Commit

Permalink
Bug 1062312 - Add the 'critical' mozapptype attribute to the callscre…
Browse files Browse the repository at this point in the history
…en, not the dialer r=alive
  • Loading branch information
gabrielesvelto authored and rvandermeulen committed Jan 22, 2015
1 parent 2055fc4 commit 80723ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions apps/system/js/browser_frame.js
Expand Up @@ -89,10 +89,7 @@
function setMozAppType(iframe, config) {
// XXX: Those urls needs to be built dynamically.
if (config.url.startsWith(window.location.protocol +
'//communications.gaiamobile.org' +
(window.location.port ?
(':' + window.location.port) : '') +
'/dialer') ||
'//callscreen.gaiamobile.org') ||
config.url.startsWith(window.location.protocol +
'//clock.gaiamobile.org')) {
iframe.setAttribute('mozapptype', 'critical');
Expand Down
7 changes: 4 additions & 3 deletions apps/system/test/unit/browser_frame_test.js
@@ -1,3 +1,5 @@
/* globals BrowserFrame */

'use strict';

/* Unit test of browser_frame.js */
Expand All @@ -17,14 +19,13 @@ suite('browser class > ', function() {
assert.equal(b.element.getAttribute('mozapptype'), 'critical');
});

test('mozapptype: dialer', function() {
test('mozapptype: callscreen', function() {
var port = '';
if (window.location.port !== '') {
port = ':' + window.location.port;
}
var b = new BrowserFrame({
url: window.location.protocol + '//' +
'communications.gaiamobile.org' + port + '/dialer'
url: window.location.protocol + '//' + 'callscreen.gaiamobile.org'
});
assert.equal(b.element.getAttribute('mozapptype'), 'critical');
});
Expand Down
1 change: 0 additions & 1 deletion build/jshint/xfail.list
Expand Up @@ -354,7 +354,6 @@ apps/system/test/marionette/notification_test.js
apps/system/test/unit/app_install_manager_test.js
apps/system/test/unit/battery_manager_test.js
apps/system/test/unit/bluetooth_transfer_test.js
apps/system/test/unit/browser_frame_test.js
apps/system/test/unit/date_picker_test.js
apps/system/test/unit/download_manager_test.js
apps/system/test/unit/download_notification_test.js
Expand Down

0 comments on commit 80723ac

Please sign in to comment.