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

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

Issue 597313002: GCD Private API: Change hardcoded code to 4 digits not 5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 6 years, 2 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 onload = function() { 5 onload = function() {
6 chrome.test.runTests([ 6 chrome.test.runTests([
7 function wifiMessage() { 7 function wifiMessage() {
8 var messages_needed = 3; 8 var messages_needed = 3;
9 function onConfirmCode(sessionId, status, confirmation) { 9 function onConfirmCode(sessionId, status, confirmation) {
10 chrome.test.assertEq("success", status); 10 chrome.test.assertEq("success", status);
11 chrome.test.assertEq("01234", confirmation.code); 11 chrome.test.assertEq("1234", confirmation.code);
12 chrome.gcdPrivate.confirmCode(sessionId, 12 chrome.gcdPrivate.confirmCode(sessionId,
13 confirmation.code, 13 confirmation.code,
14 onSessionEstablished.bind(null, 14 onSessionEstablished.bind(null,
15 sessionId)); 15 sessionId));
16 } 16 }
17 17
18 function onSessionEstablished(sessionId, status) { 18 function onSessionEstablished(sessionId, status) {
19 chrome.test.assertEq("success", status); 19 chrome.test.assertEq("success", status);
20 20
21 chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", { 21 chrome.gcdPrivate.sendMessage(sessionId, "/privet/v3/setup/start", {
(...skipping 21 matching lines...) Expand all
43 43
44 if (messages_needed == 0) { 44 if (messages_needed == 0) {
45 chrome.test.notifyPass(); 45 chrome.test.notifyPass();
46 } 46 }
47 } 47 }
48 48
49 chrome.gcdPrivate.establishSession("1.2.3.4", 9090, onConfirmCode); 49 chrome.gcdPrivate.establishSession("1.2.3.4", 9090, onConfirmCode);
50 } 50 }
51 ]); 51 ]);
52 }; 52 };
OLDNEW
« 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