This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23759 from crdlc/bug-1062527
Bug 1062527 - [Homescreen] Unable to launch apps after changing the date to a previous one
- Loading branch information
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
apps/sharedtest/test/unit/elements/gaia_grid/grid_view_test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* global GridView, GridLayout */ | ||
|
||
'use strict'; | ||
|
||
require('/shared/elements/gaia_grid/js/grid_layout.js'); | ||
require('/shared/elements/gaia_grid/js/grid_view.js'); | ||
|
||
suite('GridView', function() { | ||
|
||
var container; | ||
|
||
setup(function() { | ||
container = document.createElement('div'); | ||
document.body.appendChild(container); | ||
}); | ||
|
||
teardown(function() { | ||
document.body.removeChild(container); | ||
}); | ||
|
||
test(' reset last scroll time after touchend event', function() { | ||
this.sinon.stub(window, 'GridLayout'); | ||
|
||
var subject = new GridView({ | ||
features: {}, | ||
element: container | ||
}); | ||
|
||
assert.equal(subject.lastScrollTime, 0); | ||
|
||
subject.lastScrollTime = 1000; | ||
|
||
container.dispatchEvent(new CustomEvent('touchend')); | ||
|
||
assert.equal(subject.lastScrollTime, 0); | ||
|
||
GridLayout.restore(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters