| Index: google_apis/test/embedded_setup_chromeos.html
|
| diff --git a/google_apis/test/embedded_setup_chromeos.html b/google_apis/test/embedded_setup_chromeos.html
|
| index d2175f00336984473505f1dc0c5ccd946e5ece05..082c9ecc15d252d99450cba15c776c652c48e6f4 100644
|
| --- a/google_apis/test/embedded_setup_chromeos.html
|
| +++ b/google_apis/test/embedded_setup_chromeos.html
|
| @@ -21,6 +21,7 @@ gaia.chromeOSLogin.registerHtml5Listener = function() {
|
| }
|
| };
|
| window.addEventListener('message', onMessage);
|
| + window.addEventListener("popstate", function(e) { goBack(); });
|
| }
|
|
|
| gaia.chromeOSLogin.clearOldAttempts = function() {
|
| @@ -50,6 +51,19 @@ gaia.chromeOSLogin.backButton = function(show) {
|
| gaia.chromeOSLogin.parent_webview_url_);
|
| };
|
|
|
| +function goFirstPage() {
|
| + document.getElementById('page1').hidden = false;
|
| + document.getElementById('page2').hidden = true;
|
| + history.replaceState({}, '', window.location.pathname + '#identifier');
|
| + gaia.chromeOSLogin.backButton(false);
|
| +}
|
| +
|
| +function goBack() {
|
| + if (!document.getElementById('page2').hidden) {
|
| + goFirstPage();
|
| + }
|
| +}
|
| +
|
| function goNext() {
|
| if (!document.getElementById("page1").hidden) {
|
| document.getElementById("page1").hidden = true;
|
| @@ -88,8 +102,7 @@ function goNext() {
|
|
|
| function onLoad() {
|
| gaia.chromeOSLogin.registerHtml5Listener();
|
| - document.getElementById("page1").hidden = false;
|
| - history.replaceState({}, "", window.location.pathname + "#identifier");
|
| + goFirstPage();
|
| gaia.chromeOSLogin.clearOldAttempts();
|
| }
|
|
|
|
|