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

Cancel the installation when user hold home button #29471

Merged
merged 1 commit into from
Apr 14, 2015

Conversation

evanxd
Copy link
Contributor

@evanxd evanxd commented Apr 13, 2015

No description provided.

@evanxd evanxd force-pushed the bug-1148733 branch 3 times, most recently from ef648aa to dac776d Compare April 13, 2015 08:56
@mozilla-autolander-deprecated
Copy link
Contributor

Autolander could not find a bug number in your pull request title. All pull requests should be in the format of: Bug [number] - [description].

@lightsofapollo
Copy link
Contributor

assert.equal('visible', AppInstallManager.dialog.className);
AppInstallManager.handleHomeButtonPressed(evt);
AppInstallManager.cancelInstallation();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this approach we're not covering with tests that the event listeners are properly set.
Instead of calling cancelInstallation() directly you can dispatch real event ie.

        window.dispatchEvent(new CustomEvent('holdhome'));

This will make the test more external and test more code for the same amount of test lines :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a home event here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mozilla-autolander-deprecated
Copy link
Contributor

Autolander could not find a bug number in your pull request title. All pull requests should be in the format of: Bug [number] - [description].

@lightsofapollo
Copy link
Contributor

evanxd added a commit that referenced this pull request Apr 14, 2015
Cancel the installation when user hold home button
@evanxd evanxd merged commit 4854df6 into mozilla-b2g:master Apr 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants