Skip to content

Commit

Permalink
[fix bug 1245521] TP Tour should always try and close tab when info p…
Browse files Browse the repository at this point in the history
…anels are dismissed
  • Loading branch information
alexgibson committed Feb 15, 2016
1 parent dea2b1e commit c94e388
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions media/js/firefox/tracking-protection-tour.js
Expand Up @@ -42,7 +42,7 @@ if (typeof Mozilla === 'undefined') {
];

var options = {
closeButtonCallback: TPTour.step4
closeButtonCallback: TPTour.shouldCloseTab
};

Mozilla.UITour.getConfiguration('availableTargets', function(config) {
Expand Down Expand Up @@ -161,7 +161,7 @@ if (typeof Mozilla === 'undefined') {
TPTour.bindEvents = function() {
$('.prefs-link > a').on('click.tp-tour', TPTour.handlePrefsLinkClick);
$('#info-panel footer > button').on('click.tp-tour', TPTour.step3);
$('#info-panel header > button').on('click.tp-tour', TPTour.step4);
$('#info-panel header > button').on('click.tp-tour', TPTour.shouldCloseTab);
$(document).on('visibilitychange.tp-tour', TPTour.handleVisibilityChange);
$('#reload-btn').on('click.tp-tour', TPTour.restartTour);
$(window).on('resize.tp-tour', TPTour.handleResize);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/spec/firefox/tracking-protection-tour.js
Expand Up @@ -121,7 +121,7 @@ describe('tracking-protection-tour.js', function() {
{ callback: Mozilla.TPTour.step2, label: 'Next', style: 'primary' }
],
{
closeButtonCallback: Mozilla.TPTour.step4
closeButtonCallback: Mozilla.TPTour.shouldCloseTab
}
);

Expand Down Expand Up @@ -297,7 +297,7 @@ describe('tracking-protection-tour.js', function() {
Mozilla.TPTour.bindEvents();
expect($.fn.on).toHaveBeenCalledWith('click.tp-tour', Mozilla.TPTour.handlePrefsLinkClick);
expect($.fn.on).toHaveBeenCalledWith('click.tp-tour', Mozilla.TPTour.step3);
expect($.fn.on).toHaveBeenCalledWith('click.tp-tour', Mozilla.TPTour.step4);
expect($.fn.on).toHaveBeenCalledWith('click.tp-tour', Mozilla.TPTour.shouldCloseTab);
expect($.fn.on).toHaveBeenCalledWith('visibilitychange.tp-tour', Mozilla.TPTour.handleVisibilityChange);
expect($.fn.on).toHaveBeenCalledWith('resize.tp-tour', Mozilla.TPTour.handleResize);
expect($.fn.on).toHaveBeenCalledWith('click.tp-tour', Mozilla.TPTour.restartTour);
Expand Down

0 comments on commit c94e388

Please sign in to comment.