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

Side by Side Diff: chrome/test/data/extensions/api_test/networking/test.js

Issue 12390017: Separating ONC<->Shill translation from the ONC signature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed browser tests. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 var callbackPass = chrome.test.callbackPass; 5 var callbackPass = chrome.test.callbackPass;
6 var callbackFail = chrome.test.callbackFail; 6 var callbackFail = chrome.test.callbackFail;
7 var assertTrue = chrome.test.assertTrue; 7 var assertTrue = chrome.test.assertTrue;
8 var assertEq = chrome.test.assertEq; 8 var assertEq = chrome.test.assertEq;
9 9
10 // Test properties for the verification API. 10 // Test properties for the verification API.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 "Name": "eth0", 100 "Name": "eth0",
101 "Type": "Ethernet" 101 "Type": "Ethernet"
102 }, 102 },
103 { 103 {
104 "ConnectionState": "Connected", 104 "ConnectionState": "Connected",
105 "GUID": "stub_wifi1", 105 "GUID": "stub_wifi1",
106 "Name": "wifi1", 106 "Name": "wifi1",
107 "Type": "WiFi", 107 "Type": "WiFi",
108 "WiFi": { 108 "WiFi": {
109 "SSID": "stub_wifi1", 109 "SSID": "stub_wifi1",
110 "Type": "WiFi"
111 } 110 }
112 }, 111 },
113 { 112 {
114 "ConnectionState": "NotConnected", 113 "ConnectionState": "NotConnected",
115 "GUID": "stub_wifi2", 114 "GUID": "stub_wifi2",
116 "Name": "wifi2_PSK", 115 "Name": "wifi2_PSK",
117 "Type": "WiFi", 116 "Type": "WiFi",
118 "WiFi": { 117 "WiFi": {
119 "SSID": "stub_wifi2", 118 "SSID": "stub_wifi2",
120 "Type": "WiFi" 119 "Security": "WPA-PSK",
120 "SignalStrength": 80
121 } 121 }
122 }, 122 },
123 { 123 {
124 "ConnectionState": "NotConnected", 124 "ConnectionState": "NotConnected",
125 "GUID": "stub_cellular1", 125 "GUID": "stub_cellular1",
126 "Name": "cellular1", 126 "Name": "cellular1",
127 "Type": "Cellular" 127 "Type": "Cellular"
128 } 128 }
129 ], result); 129 ], result);
130 })); 130 }));
131 }, 131 },
132 function getVisibleNetworksWifi() { 132 function getVisibleNetworksWifi() {
133 chrome.networkingPrivate.getVisibleNetworks( 133 chrome.networkingPrivate.getVisibleNetworks(
134 "WiFi", 134 "WiFi",
135 callbackPass(function(result) { 135 callbackPass(function(result) {
136 assertTrue(!!result); 136 assertTrue(!!result);
137 assertEq(2, result.length); 137 assertEq(2, result.length);
138 assertEq([{ 138 assertEq([{
139 "ConnectionState": "Connected", 139 "ConnectionState": "Connected",
140 "GUID": "stub_wifi1", 140 "GUID": "stub_wifi1",
141 "Name": "wifi1", 141 "Name": "wifi1",
142 "Type": "WiFi", 142 "Type": "WiFi",
143 "WiFi": { 143 "WiFi": {
144 "SSID": "stub_wifi1", 144 "SSID": "stub_wifi1"
145 "Type": "WiFi"
146 } 145 }
147 }, 146 },
148 { 147 {
149 "ConnectionState": "NotConnected", 148 "ConnectionState": "NotConnected",
150 "GUID": "stub_wifi2", 149 "GUID": "stub_wifi2",
151 "Name": "wifi2_PSK", 150 "Name": "wifi2_PSK",
152 "Type": "WiFi", 151 "Type": "WiFi",
153 "WiFi": { 152 "WiFi": {
154 "SSID": "stub_wifi2", 153 "SSID": "stub_wifi2",
155 "Type": "WiFi" 154 "Security": "WPA-PSK",
155 "SignalStrength": 80
156 } 156 }
157 } 157 }
158 ], result); 158 ], result);
159 })); 159 }));
160 }, 160 },
161 function getProperties() { 161 function getProperties() {
162 chrome.networkingPrivate.getProperties( 162 chrome.networkingPrivate.getProperties(
163 "stub_wifi2", 163 "stub_wifi2",
164 callbackPass(function(result) { 164 callbackPass(function(result) {
165 assertTrue(!!result); 165 assertTrue(!!result);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 callbackPass(function(result) { 212 callbackPass(function(result) {
213 assertEq("encrypted_data", result); 213 assertEq("encrypted_data", result);
214 })); 214 }));
215 } 215 }
216 ]; 216 ];
217 217
218 var testToRun = window.location.search.substring(1); 218 var testToRun = window.location.search.substring(1);
219 chrome.test.runTests(availableTests.filter(function(op) { 219 chrome.test.runTests(availableTests.filter(function(op) {
220 return op.name == testToRun; 220 return op.name == testToRun;
221 })); 221 }));
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/networking_private_event_router.cc ('k') | chromeos/network/onc/onc_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698