OLD | NEW |
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 // The expectations in this test for the Chrome OS implementation. See | 5 // The expectations in this test for the Chrome OS implementation. See |
6 // networking_private_chromeos_apitest.cc for more info. | 6 // networking_private_chromeos_apitest.cc for more info. |
7 | 7 |
8 var callbackPass = chrome.test.callbackPass; | 8 var callbackPass = chrome.test.callbackPass; |
9 var callbackFail = chrome.test.callbackFail; | 9 var callbackFail = chrome.test.callbackFail; |
10 var assertTrue = chrome.test.assertTrue; | 10 var assertTrue = chrome.test.assertTrue; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 verifyTetherNetwork: function( | 85 verifyTetherNetwork: function( |
86 properties, expectedGuid, expectedName, expectedBatteryPercentage, | 86 properties, expectedGuid, expectedName, expectedBatteryPercentage, |
87 expectedCarrier, expectedSignalStrength) { | 87 expectedCarrier, expectedSignalStrength) { |
88 //assertEq(NetworkType.Tether, properties.Type); | 88 //assertEq(NetworkType.Tether, properties.Type); |
89 assertEq(expectedGuid, properties.GUID); | 89 assertEq(expectedGuid, properties.GUID); |
90 assertEq(expectedName, | 90 assertEq(expectedName, |
91 properties.Name.hasOwnProperty('Active') ? properties.Name.Active | 91 properties.Name.hasOwnProperty('Active') ? properties.Name.Active |
92 : properties.Name); | 92 : properties.Name); |
93 assertEq(expectedBatteryPercentage, properties.Tether.BatteryPercentage); | 93 assertEq(expectedBatteryPercentage, properties.Tether.BatteryPercentage); |
94 assertEq(expectedCarrier, properties.Tether.Carrier); | 94 assertEq(expectedCarrier, properties.Tether.Carrier); |
| 95 // TODO(khorimoto): Add the expected value as a parameter once it can be set |
| 96 // via the Tether component. |
| 97 assertFalse(properties.Tether.HasConnectedToHost); |
95 assertEq(expectedSignalStrength, properties.Tether.SignalStrength); | 98 assertEq(expectedSignalStrength, properties.Tether.SignalStrength); |
96 } | 99 } |
97 }; | 100 }; |
98 | 101 |
99 var kFailure = 'Failure'; | 102 var kFailure = 'Failure'; |
100 | 103 |
101 function networkCallbackPass() { | 104 function networkCallbackPass() { |
102 var callbackCompleted = chrome.test.callbackAdded(); | 105 var callbackCompleted = chrome.test.callbackAdded(); |
103 return function(result) { | 106 return function(result) { |
104 chrome.test.assertNoLastError(); | 107 chrome.test.assertNoLastError(); |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 var tests = availableTests.filter(function(op) { | 980 var tests = availableTests.filter(function(op) { |
978 return args.test == op.name; | 981 return args.test == op.name; |
979 }); | 982 }); |
980 if (tests.length !== 1) { | 983 if (tests.length !== 1) { |
981 chrome.test.notifyFail('Test not found ' + args.test); | 984 chrome.test.notifyFail('Test not found ' + args.test); |
982 return; | 985 return; |
983 } | 986 } |
984 | 987 |
985 chrome.test.runTests(tests); | 988 chrome.test.runTests(tests); |
986 }); | 989 }); |
OLD | NEW |