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.
Bug 1068356 - Authentication screen remains indefinitely when long ta…
…pping on the homescreen button in the FxAccount login proccess. r=alive Conflicts: apps/system/js/fxa_ui.js apps/system/js/mobileid_dialog.js
- Loading branch information
1 parent
87ee41f
commit 95a5168
Showing
5 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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,112 @@ | ||
'use strict'; | ||
|
||
/* global FxAccountsUI */ | ||
|
||
require('/js/fxa_ui.js'); | ||
|
||
suite('system/FxAccountsUI', function() { | ||
setup(function() { | ||
window.FxAccountsDialog = function() {}; | ||
window.FxAccountsDialog.prototype = { | ||
getView: function() { | ||
return { | ||
removeChild: function() {} | ||
}; | ||
} | ||
}; | ||
}); | ||
|
||
teardown(function() { | ||
window.FxAccountsDialog = null; | ||
}); | ||
|
||
suite('Before init', function() { | ||
test('Should not have a dialog', function() { | ||
assert.isNull(FxAccountsUI.dialog); | ||
}); | ||
|
||
test('Should not have a panel', function() { | ||
assert.isNull(FxAccountsUI.panel); | ||
}); | ||
|
||
test('Should not have an iframe', function() { | ||
assert.isNull(FxAccountsUI.iframe); | ||
}); | ||
}); | ||
|
||
suite('After init', function() { | ||
setup(function() { | ||
FxAccountsUI.init(); | ||
}); | ||
|
||
test('Should not have a dialog', function() { | ||
assert.ok(FxAccountsUI.dialog); | ||
}); | ||
|
||
test('Should not have a panel', function() { | ||
assert.ok(FxAccountsUI.panel); | ||
}); | ||
|
||
test('Should not have an iframe', function() { | ||
assert.ok(FxAccountsUI.iframe); | ||
}); | ||
}); | ||
|
||
suite('Reset', function() { | ||
var onerrorReason; | ||
|
||
setup(function() { | ||
FxAccountsUI.onerrorCb = function(reason) { | ||
onerrorReason = reason; | ||
}; | ||
}); | ||
|
||
suite('Reset "home" reason', function() { | ||
setup(function() { | ||
FxAccountsUI.reset('home'); | ||
}); | ||
|
||
teardown(function() { | ||
onerrorReason = null; | ||
}); | ||
|
||
test('onerror should be called on reset with "home" reason', function() { | ||
assert.equal(onerrorReason, 'DIALOG_CLOSED_BY_USER'); | ||
assert.isNull(FxAccountsUI.onerrorCb); | ||
}); | ||
}); | ||
|
||
suite('Reset "holdhome" reason', function() { | ||
setup(function() { | ||
FxAccountsUI.reset('holdhome'); | ||
}); | ||
|
||
teardown(function() { | ||
onerrorReason = null; | ||
}); | ||
|
||
test('onerror should be called on reset with "holdhome" reason', | ||
function() { | ||
assert.equal(onerrorReason, 'DIALOG_CLOSED_BY_USER'); | ||
assert.isNull(FxAccountsUI.onerrorCb); | ||
}); | ||
}); | ||
|
||
suite('Reset "whatever" reason', function() { | ||
setup(function() { | ||
FxAccountsUI.reset('whatever'); | ||
}); | ||
|
||
teardown(function() { | ||
onerrorReason = null; | ||
}); | ||
|
||
test('onerror should be called on reset with "whatever" reason', | ||
function() { | ||
assert.isNull(onerrorReason); | ||
assert.isNull(FxAccountsUI.onerrorCb); | ||
}); | ||
}); | ||
|
||
}); | ||
}); |
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