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

Commit

Permalink
Merge pull request #25283 from sfoster/ftu-hidden-wifi-bug-935495
Browse files Browse the repository at this point in the history
Bug 935495 - Add x-inputmode=verbatim to avoid autocorrecting password. r=fcampo
  • Loading branch information
sfoster committed Oct 21, 2014
2 parents 8aa08e2 + e14b283 commit ac73ec0
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/ftu/index.html
Expand Up @@ -330,8 +330,8 @@ <h1 id="main-title"></h1>
<label id="label_hidden_wifi_password" for="hidden-wifi-password" data-l10n-id="password">
Password
</label>
<input type="password" name="wifi_hidden_password" id="hidden-wifi-password" value="" maxlength="63" />
<label class="pack-checkbox" id="label_show_password" for="hidden-wifi-show-password">
<input type="password" name="wifi_hidden_password" id="hidden-wifi-password" value="" x-inputmode="verbatim" maxlength="63" />
<label class="pack-checkbox" id="label_hidden_show_password" for="hidden-wifi-show-password">
<input type="checkbox" id="hidden-wifi-show-password">
<span data-l10n-id="showPassword">
Show Password
Expand Down
1 change: 1 addition & 0 deletions apps/ftu/test/marionette/ftu_test.js
Expand Up @@ -26,4 +26,5 @@ marionette('First Time Use >', function() {
ftu.clickThruPanel('#browser_privacy', '#forward');
ftu.clickThruPanel('#finish-screen', undefined);
});

});
5 changes: 4 additions & 1 deletion apps/ftu/test/marionette/lib/ftu.js
@@ -1,8 +1,11 @@
'use strict';
'use strict';
/* global module */

var Marionette = require('marionette-client');

function Ftu(client) {
this.client = client;
this.actions = new Marionette.Actions(this.client);
}

Ftu.clientOptions = {
Expand Down
27 changes: 26 additions & 1 deletion apps/ftu/test/marionette/wifi_hidden_network_test.js
Expand Up @@ -14,7 +14,7 @@ marionette('First Time Use > Wifi Hidden Network Test', function() {
});

test('Wi-Fi hidden network password 64 characters', function() {
client.apps.switchToApp(Ftu.URL);
ftu.client.apps.switchToApp(Ftu.URL);
ftu.clickThruPanel('#languages', '#forward');
ftu.clickThruPanel('#wifi', '#join-hidden-button');

Expand All @@ -25,4 +25,29 @@ marionette('First Time Use > Wifi Hidden Network Test', function() {
password = input.getAttribute('value');
assert.equal(password.length, 63);
});

test('Wi-Fi hidden network show password', function() {
ftu.client.apps.switchToApp(Ftu.URL);
ftu.clickThruPanel('#languages', '#forward');
ftu.clickThruPanel('#wifi', '#join-hidden-button');

var hiddenWifiPanel = ftu.client.helper
.waitForElement('#hidden-wifi-authentication');
var showPassword = ftu.client.findElement('#label_hidden_show_password');
var passwordInput = ftu.client.findElement('#hidden-wifi-password');

assert(hiddenWifiPanel.displayed() &&
showPassword.displayed() &&
passwordInput.displayed()
);

showPassword.click();
ftu.client.helper.waitFor(function() {
return passwordInput.getAttribute('type') === 'text';
});

// Make sure input wont get auto-corrected
assert.equal(passwordInput.getAttribute('x-inputmode'), 'verbatim');
});

});
2 changes: 1 addition & 1 deletion apps/ftu/test/unit/wifi_test.js
Expand Up @@ -110,7 +110,7 @@ suite('wifi > ', function() {
' Password' +
' </label>' +
' <input type="password" id="hidden-wifi-password" maxlength="63" />' +
' <label id="label_show_password">' +
' <label id="label_hidden_show_password">' +
' <input type="checkbox" id="hidden-wifi-show-password" />' +
' <span></span>' +
' <p>Show Password</p>' +
Expand Down

0 comments on commit ac73ec0

Please sign in to comment.