Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6467)

Unified Diff: chrome/test/data/chromeos/oobe_webui_browsertest.js

Issue 1249163002: Fixed Bluetooth keyboard pairing pincode visibility issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/chromeos/oobe_webui_browsertest.js
diff --git a/chrome/test/data/chromeos/oobe_webui_browsertest.js b/chrome/test/data/chromeos/oobe_webui_browsertest.js
index fa685e8eec4216a2471cb3215220fd8d2a5fc60e..e2c4ce57782d8767e5b8c5f13f1624a3d3889740 100644
--- a/chrome/test/data/chromeos/oobe_webui_browsertest.js
+++ b/chrome/test/data/chromeos/oobe_webui_browsertest.js
@@ -128,3 +128,58 @@ TEST_F('OobeWebUITest', 'DISABLED_OobeUserImage', function() {
TEST_F('OobeWebUITest', 'DISABLED_OobeAccountPicker', function() {
Oobe.getInstance().showScreen({'id':'account-picker'});
});
+
+
+TEST_F('OobeWebUITest', 'HIDDetectionScreenTest', function() {
+ function getPincodeSymbol(i) {
+ return $('hid-keyboard-pincode-sym-' + (i + 1));
+ }
+
+ function getDisplayedPincode() {
+ var pincode = '';
+ for (var i = 0; i < 6; ++i)
+ pincode += getPincodeSymbol(i).textContent;
+ return pincode;
+ }
+
+ login.HIDDetectionScreen.contextChanged({
+ 'keyboard-state': 'searching',
+ 'mouse-state': 'searching'
+ });
+ Oobe.showScreen({'id': 'hid-detection'});
+ expectTrue($('hid-keyboard-pincode').hidden);
+
+ login.HIDDetectionScreen.contextChanged({
+ 'keyboard-state': 'pairing',
+ 'keyboard-pincode': '013188'
+ });
+ expectFalse($('hid-keyboard-pincode').hidden);
+ expectEquals('013188', getDisplayedPincode());
+
+ login.HIDDetectionScreen.contextChanged({
+ 'num-keys-entered-expected': true,
+ 'num-keys-entered-pincode': 3
+ });
+ expectFalse($('hid-keyboard-pincode').hidden);
+ expectEquals('013188', getDisplayedPincode());
+ [
+ { 'key-typed': true },
+ { 'key-typed': true },
+ { 'key-typed': true },
+ { 'key-next': true },
+ { 'key-untyped': true },
+ { 'key-untyped': true },
+ { 'key-untyped': true } // Enter key symbol.
+ ].forEach(function(expectedClasses, i) {
+ var symbol = getPincodeSymbol(i);
+ ['key-typed', 'key-untyped', 'key-next'].forEach(function(className) {
+ expectEquals(!!expectedClasses[className],
+ symbol.classList.contains(className));
+ });
+ });
+
+ login.HIDDetectionScreen.contextChanged({
+ 'keyboard-state': 'connected'
+ });
+ expectTrue($('hid-keyboard-pincode').hidden);
+});
« no previous file with comments | « chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698