Loading apps/system/test/marionette/media_playback_test.js +20 −1 Changes for apps/system/test/marionette/media_playback_test.js: 20 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ marionette('media playback tests', function() { }); }); test('should play/pause from notification area', function() { test('should play/pause from now playing widget', function() { music.runInApp(function() { music.albumOneElement.click(); }); Loading @@ -139,6 +139,25 @@ marionette('media playback tests', function() { }); }); test('should play/pause from now playing widget after closing and ' + 'reopening music app', function() { music.close(); music.launchInBackground(); music.runInApp(function() { music.albumOneElement.click(); }); playback[suiteInfo.opener](function(container) { container.waitForContainerShown(true); container.playPause(); music.runInApp(function() { assert.equal(music.isPlaying, false); }); assert.equal(container.isPlaying, false); }); }); test('should go to next/prev track from notification area', function() { music.runInApp(function() { music.albumOneElement.click(); Loading shared/js/iac_handler.js +6 −4 Changes for shared/js/iac_handler.js: 6 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ var IACHandler = { _eventPrefix: 'iac-', _ports: [], _ports: {}, init: function onInit() { var self = this; Loading @@ -11,10 +12,10 @@ var IACHandler = { var keyword = request.keyword; var port = request.port; // We will save each port by keyword if (!self._ports[keyword]) { // We will save each port by keyword; ports may get overwritten // sometimes, but that's ok because there should only be one *active* // port with a given keyword at any time. self._ports[keyword] = port; } port.onmessage = function onReceivedMessage(evt) { var message = evt.data; Loading @@ -40,6 +41,7 @@ var IACHandler = { }; }); }, getPort: function(keyword) { return this._ports[keyword]; } Loading Loading
apps/system/test/marionette/media_playback_test.js +20 −1 Changes for apps/system/test/marionette/media_playback_test.js: 20 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ marionette('media playback tests', function() { }); }); test('should play/pause from notification area', function() { test('should play/pause from now playing widget', function() { music.runInApp(function() { music.albumOneElement.click(); }); Loading @@ -139,6 +139,25 @@ marionette('media playback tests', function() { }); }); test('should play/pause from now playing widget after closing and ' + 'reopening music app', function() { music.close(); music.launchInBackground(); music.runInApp(function() { music.albumOneElement.click(); }); playback[suiteInfo.opener](function(container) { container.waitForContainerShown(true); container.playPause(); music.runInApp(function() { assert.equal(music.isPlaying, false); }); assert.equal(container.isPlaying, false); }); }); test('should go to next/prev track from notification area', function() { music.runInApp(function() { music.albumOneElement.click(); Loading
shared/js/iac_handler.js +6 −4 Changes for shared/js/iac_handler.js: 6 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ var IACHandler = { _eventPrefix: 'iac-', _ports: [], _ports: {}, init: function onInit() { var self = this; Loading @@ -11,10 +12,10 @@ var IACHandler = { var keyword = request.keyword; var port = request.port; // We will save each port by keyword if (!self._ports[keyword]) { // We will save each port by keyword; ports may get overwritten // sometimes, but that's ok because there should only be one *active* // port with a given keyword at any time. self._ports[keyword] = port; } port.onmessage = function onReceivedMessage(evt) { var message = evt.data; Loading @@ -40,6 +41,7 @@ var IACHandler = { }; }); }, getPort: function(keyword) { return this._ports[keyword]; } Loading