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

Unified Diff: chrome/test/data/extensions/api_test/gcd_private/api/wifi_message.js

Issue 877613002: Added pairing with Spake SHA224 key exchange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@brillo1
Patch Set: Thu Jan 29 23:44:10 PST 2015 Created 5 years, 11 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/test/data/extensions/api_test/gcd_private/api/session.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/extensions/api_test/gcd_private/api/wifi_message.js
diff --git a/chrome/test/data/extensions/api_test/gcd_private/api/wifi_message.js b/chrome/test/data/extensions/api_test/gcd_private/api/wifi_message.js
index 4a5e5a9b62bd54599af5bba0d01326aea1246dac..ad99fe06c56c79cc56ab5121e0ff0b56d641597a 100644
--- a/chrome/test/data/extensions/api_test/gcd_private/api/wifi_message.js
+++ b/chrome/test/data/extensions/api_test/gcd_private/api/wifi_message.js
@@ -5,40 +5,9 @@
onload = function() {
chrome.test.runTests([
function wifiMessage() {
- var messagesNeeded = 3;
+ var messagesNeeded = 4;
var sessionId = -1;
- function onSessionEstablished(newSessionId) {
- sessionId = newSessionId;
- chrome.gcdPrivate.startPairing(sessionId, "embeddedCode",
- onPairingStarted);
- }
-
- function onPairingStarted(status) {
- chrome.test.assertEq("success", status);
- chrome.gcdPrivate.confirmCode(sessionId, "1234", onCodeConfirmed);
- }
-
- function onCodeConfirmed(status) {
- chrome.test.assertEq("success", status);
- chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
- "wifi" : {
- }
- }, onMessageSent.bind(null, "setupParseError"));
-
- chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
- "wifi" : {
- "passphrase": "Blah"
- }
- }, onMessageSent.bind(null, "setupParseError"));
-
- chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
- "wifi" : {
- "ssid": "Blah"
- }
- }, onMessageSent.bind(null, "wifiPasswordError"));
- }
-
function onMessageSent(expected_status, status, output) {
chrome.test.assertEq(expected_status, status);
messagesNeeded--;
@@ -47,9 +16,31 @@ onload = function() {
if (messagesNeeded == 0) {
chrome.test.notifyPass();
}
- }
+ };
+
+ chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
+ "wifi" : {
+ }
+ }, onMessageSent.bind(null, "setupParseError"));
+
+ chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
+ "wifi" : {
+ "passphrase": "Blah"
+ }
+ }, onMessageSent.bind(null, "setupParseError"));
- chrome.gcdPrivate.establishSession("1.2.3.4", 9090, onSessionEstablished);
+ chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
+ "wifi" : {
+ "ssid": "Blah"
+ }
+ }, onMessageSent.bind(null, "wifiPasswordError"));
+
+ chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
+ "wifi": {
+ "ssid": "Blah",
+ "passphrase": "111"
+ }
+ }, onMessageSent.bind(null, "unknownSessionError"));
}
]);
};
« no previous file with comments | « chrome/test/data/extensions/api_test/gcd_private/api/session.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698