| # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Purpose: This test case verifies the API for accessing Profiles and Entries. |
| # It verifies that credentials are saved on successful connection and |
| # discarded when the profile is removed. |
| |
| { "name":"TestProfileCredentials", |
| "steps":[ |
| |
| [ "profile_pop", { "name":"test" } ], |
| [ "profile_create", { "name":"top" } ], |
| [ "profile_push", { "name":"top" } ], |
| |
| [ "create", { "type":"hostap" } ], |
| [ "config", { "ssid":"ProfileTestSSID", |
| "channel":"2412", "mode":"11g", |
| "wepmode":"on", |
| "wep_key0": '"abcde"', |
| "wep_key1": '"vwxyz"', |
| "wep_key2": '"decba"', |
| "wep_key3": '"zyxwv"', |
| "deftxkey":"0" } ], |
| [ "connect", { "ssid":"ProfileTestSSID", |
| "security":"wep", "psk":"0:abcde" } ], |
| |
| # Verify that credentials are saved on successful connect. |
| |
| [ "client_check_service_properties", |
| { "service":"ProfileTestSSID", |
| "SaveCredentials":1} ], |
| |
| [ "disconnect" ], |
| [ "connect", { "ssid":"ProfileTestSSID" } ], |
| |
| # Pop the profile and check that the credentials are gone. |
| |
| [ "disconnect" ], |
| [ "profile_pop", { "name":"top" } ], |
| |
| # Make sure that the credentials are gone. |
| |
| [ "!connect", { "ssid":"ProfileTestSSID" } ], |
| |
| # And, verify that we can connect if we provide the proper credentials. |
| |
| [ "connect", { "ssid":"ProfileTestSSID", |
| "security":"wep", "psk":"0:abcde" } ], |
| |
| # Cleanup. |
| |
| [ "~disconnect" ], |
| [ "client_profile_delete_entry", |
| { "profile":"default", |
| "entry":"ProfileTestSSID" } ], |
| [ "~deconfig" ], |
| [ "~destroy" ], |
| [ "~profile_remove", { "name":"top" } ], |
| [ "~profile_push", { "name":"test" } ], |
| ], |
| } |