History log of /system/connectivity/shill/property_store_unittest.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
03e6719bae1e0903d94853b896673a033196bcf5 13-Oct-2015 Alex Vakulenko <avakulenko@google.com> shill: Rename "chromeos" -> "brillo" in include paths and namespaces

libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.

Bug: 24872993
TEST=built for aosp and brillo, all unit tests pass on dragonboard

Change-Id: I804311e49ee780ca96e05f6a581e8c95709d4e1d
/system/connectivity/shill/property_store_unittest.cc
289a5a5e18bb1a676b3dfce111af4c2c00c7776e 21-Sep-2015 Samuel Tan <samueltan@google.com> shill: use different service_constants.h path for Android builds

Use the service_constants.h file from the external/cros/system_api/dbus
instead of chromeos/dbus/service_constants.h, since this header file
is installed into different directories when building shill for Android
and Chrome OS.

BUG: 22956441
Change-Id: I7e6ea46b4893588d2862792cf43aa83fdf7c30b4
TEST: shill still compiles using emerge.
/system/connectivity/shill/property_store_unittest.cc
bad1c10ffd2d4ac14f7bd9f4ef6a8982e711f566 19-Sep-2015 mukesh agrawal <quiche@google.com> shill: remove references to GLib

There are a number of references to GLib (the object),
even though no one uses GLib in a substantive way.
Remove these obsolete references.

Bug: 23386647
TEST=unit tests

Change-Id: I8d574980bc8e853c8b87ef64b581d64a71491201
/system/connectivity/shill/property_store_unittest.cc
c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 03-Sep-2015 Peter Qiu <zqiu@google.com> License shill to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi, the NOTICE was added with a copy
of the Apache2 license and MODULE_LICENSE_* file was added.

BUG=23587594
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/property_store_unittest.cc
b8172ec75bbc9faac13a33e162ddedd53a97d1c8 12-Aug-2015 Peter Qiu <zqiu@chromium.org> shill: remove dbus-c++ dependency from PropertyStoreTest

Also update tests that uses PropertyStoreTest.

BUG=chromium:517680
TEST=unittests

Change-Id: Ie668a5adddeaec9355ad6b99fff40266ad14826c
Reviewed-on: https://chromium-review.googlesource.com/293005
Commit-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
ca813a0b80215425cb615c544ba426b22c5c6969 16-Jul-2015 Peter Qiu <zqiu@chromium.org> shill: update KeyValueStore to/from chromeos::VariantDictionary conversion

Simplify KeyValuStore/chromeos::VariantDictionary conversion function
now that we're using chromeos::VariantDictionary for KeyValueStore's
internal data storage.

Also remove the similar functions in PropertyStore, and redirect all
references to the new functions. This allows these functions to be used
by RPC proxy interfaces APIs.

BUG=chromium:510238
TEST=USE="asan clang chromeos_dbus" FEATURES=test emerge-$BOARD shill

Change-Id: I926981f6823b0179112f2987cf028fe0edb829f3
Reviewed-on: https://chromium-review.googlesource.com/286144
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
d31fb5812df751f0bfac41e2c0489e1a8a18cfd7 15-Jul-2015 Peter Qiu <zqiu@chromium.org> shill: refactor KeyValueStore internal data structures

Use a single chromeos::VariantDictionary to store all key value
pairs instead of having one map per data type.

Also overload the == and != operators for equality comparison
when KeyValueStore is wrapped inside a chromeos::Any object, which
is needed for nested KeyValueStore.

BUG=chromium:510238
TEST=USE="asan clang" FEATURES=test emerge-$BOARD shill

Change-Id: I8b014d602b9d67538a86d0f5e0fdd1fb07556533
Reviewed-on: https://chromium-review.googlesource.com/285930
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
967ec60af682c54b2068a15c5606e45bd3aeca7e 24-Jun-2015 Peter Qiu <zqiu@chromium.org> shill: update PropertyStore to support chromeos::Any variant type

This is needed to allow us to switch over to use ChromeOS DBus
library instead of dbus-c++, mainly for supporting property related
DBus methods (SetProperty, GetProperties, SetProperties).

This will not be needed once we decide to switch over to use ChromeOS
DBus's internal property support.

BUG=chromium:503796
TEST=USE="asan clang" FEATURES=test emerge-$BOARD shill

Change-Id: If654cca427a959deb737e5c4a338fcaf9c264ba4
Reviewed-on: https://chromium-review.googlesource.com/281633
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
3b30ca58d13cf66b75ba0729b222ddc42ae68b33 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: Top-level unit tests: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: I86c072b89281e0de18928b47860b99d779af061a
Reviewed-on: https://chromium-review.googlesource.com/278037
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
1ce231c71932200e4d02c71567f8e93788120781 13-Jun-2015 Paul Stewart <pstew@chromium.org> shill: Manager: Refactor command line setup

In anticipation of a new and different implementation of
shill::Daemon, this CL re-factors the interaction between
the main() function and shill::Daemon by passing a new
Daemon::Settings structure. This way the process of parsing
command line parameters is separated from the task of
delivering this configuration the Daemon object. While here,
the "default_technology_order" field of was unified with the
other parameters passed to the Manager from the Daemon.

However this change is somewhat dwarfed by the technical
debt that needed to be paid off in order to allow this new
change to be tested. The new Daemon::ApplySettings method
makes no new calls to the Manager object but none of these
methods were previously mocked in the MockManager object.
More troublingly the side-effects of these Manager methods
were depended on in MockManager, so a few tests (notably
DeviceTest) needed to be re-architected to deal with mock
functionality instead of assuming the Mock object did what
a real Manager would do.

Lastly, both the Device::PrependDNSServers and
Manager::FilterPrependDNSServersByFamily methods seemed
a bit hard to understand and difficult to test. Minor
changes to these APIs allowed the test changes above to
work a lot smoother, and also to separate the unit tests
to work on individually testing the functionality in each
object.

BUG=chromium:500991
TEST=Unit tests

Change-Id: I04c33c841024c102ff9658e5857236ab2e5bf32f
Reviewed-on: https://chromium-review.googlesource.com/278022
Reviewed-by: Garret Kelly <gdk@chromium.org>
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
5a2097c0f4db1704dd5b7b0b874b669bb21c42ad 11-Feb-2015 Jason Simmons <jsimmons@google.com> shill: Add a command line option that controls the default technology order

This can be used to configure a preference for a particular network on a given
device. For example, a device may want to use the mobile network for all
traffic even if an open wifi network is available.

BUG=chromium:453607
TEST=Added the flag via /etc/init/shill.override and confirmed that dbus GetServiceOrder returned the new order

Change-Id: Ifac0baa4feeaae4a780d4d74f2bd195b4e4dd31d
Reviewed-on: https://chromium-review.googlesource.com/248610
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Jason Simmons <jsimmons@chromium.org>
Commit-Queue: Jason Simmons <jsimmons@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
004b3854911240a84820c3c386e5e2b7747e2d95 14-Jan-2015 Paul Stewart <pstew@chromium.org> shill: DBusAdaptor: Handle KeyValueStore property sets

CL:217135 added a settable KeyValueStore property but failed to
add the code in DBusAdaptor to accept a DBus dict variant as an
argument to SetProperty. This CL adds this functionality and
modifies unit tests to verify it.

BUG=chromium:448438
TEST=Unit tests

Change-Id: I696ee6933307e94c7165fae7dc8437cfbd48a004
Reviewed-on: https://chromium-review.googlesource.com/240573
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
cddd2d09878704128d35ddfeec862109b7d7fdc9 11-Nov-2014 Alex Deymo <deymo@chromium.org> Include the implemented header first in all projects.

The Google C++ style guide dictates that foo.cc and foo_unittest.cc
should include foo.h in the first place, so missing headers in foo.h
are detected with a compile error of the module implementing them and
not when another module uses them.

This CL sweeps across all the .cc file in platform2 enforcing this.

BUG=None
TEST=cbuildbot amd64-generic

Change-Id: I41835835caba13f54c3c844ecf552eb0e47efa9d
Reviewed-on: https://chromium-review.googlesource.com/228894
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
cc225ef3b77b5e098cc12c661a947e1737480777 30-Sep-2014 Ben Chan <benchan@chromium.org> shill: Replace NULL with nullptr.

BUG=None
TEST=`USE=wimax FEATURES=test emerge-$BOARD shill`

Change-Id: I30ab47ff32dcadad09ae7a2baf4d4123a6ef0d8e
Reviewed-on: https://chromium-review.googlesource.com/220657
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
cc67c52a2c00f90e877971d552208dd99825d84e 03-Sep-2014 Ben Chan <benchan@chromium.org> shill: Include base/macros.h instead of base/basictypes.h

shill no longer uses the integer types from base/basictypes.h. It should
simply include base/macros.h for the DISALLOW_COPY_AND_ASSIGN macro
instead.

BUG=None
TEST=`USE='cellular wimax' FEATURES=test emerge-$BOARD platform2`

Change-Id: I9b350c1bd9eff88e2c87de2ef8d607e90049e102
Reviewed-on: https://chromium-review.googlesource.com/216055
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
d1d5dbb6d7eb2e01642046732dd570203a918874 21-Aug-2014 Prathmesh Prabhu <pprabhu@chromium.org> shill: property_store fix lint errors.

Test code took non-const references. FixedIt.

BUG=chromium:198977
TEST=USE="clang asan" FEATURES="test" emerge-link platform2

Change-Id: Ib86ddb4d317d48e374ce688facbc9ac6ee2b3800
Reviewed-on: https://chromium-review.googlesource.com/213312
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
7fab89734d88724a288e96a9996b15548c5294c7 11-Aug-2014 Ben Chan <benchan@chromium.org> shill: Use integer types from stdint.h

This CL replaces the deprecated int* and uint* types from
'base/basictypes.h' with the int*_t and uint*_t types from 'stdint.h'.

BUG=chromium:401356
TEST=`USE='cellular gdmwimax wimax' FEATURES=test emerge-$BOARD platform2`

Change-Id: I3d4c195881203dd2a47dbb5af150b6c90b9c206e
Reviewed-on: https://chromium-review.googlesource.com/211770
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
71b9ed5c757c26cfe4c7c6fb05c7debfa7c89c97 29-Jan-2014 Paul Stewart <pstew@chromium.org> shill: Error: Use error strings from service_constants

Move the DBus error message strings out of shill and use the new
definitions in service_constants.h. Nobody used the unadorned
"name" field in Error::Info anyway.

CQ-DEPEND=CL:184385
BUG=chromium:256889
TEST=Unit tests

Change-Id: Ie2a35a30064d2ce2e599d96a325e64cc3a552e57
Reviewed-on: https://chromium-review.googlesource.com/184354
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
f94ec24b8ed90665439b316bc819acfc655699d2 29-Oct-2013 mukesh agrawal <quiche@chromium.org> shill: fix PropertyStoreTypedTest.GetProperty

This test fails in an x86-generic ASAN build, for TypeParam=bool.
I suspect it's because, in that case, |property| is uninitialized
(bool has no default constructor).

Fix this, by value-initializing |property|. While there, move
an existing value-initialization (in another test) to c++11
uniform initialization syntax.

BUG=chromium:312937
TEST=FEATURES=test USE="clang asan" emerge-x86-generic platform2

Change-Id: Iada3dd87108eb7b8e60baf47bb55db66576ac304
Reviewed-on: https://chromium-review.googlesource.com/175030
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
e7c7e65bba9e964aa500ef53cc79215426acf50c 19-Jun-2013 mukesh agrawal <quiche@chromium.org> shill: add FrequencyList property to WiFiServices

The main intended change in this CL is to expose the known frequencies
for a WiFi network via D-Bus properties. This required adding a new
property type (array of uint16).

While there, though, I made some changes to the DBusAdaptor and
PropertyStore unit tests. These changes should make it easier to
identify and update the relevant unit tests when we add new property
types.

Specifically:
- add a GetProperties test to dbus_adaptor_unittest.cc
- add a GetProperty test to property_store_unittest.cc
- make the list of PropertyTypes accessible from outside property_store_unittest
- make the RegisterProperty shims accessible from outside property_store_unittest
- create GetProperty shims, and make them accessible as well

Additional changes:
- remove some unnecessary (as of c++11) whitespace between angle brackets
- make initialization of DBusAdaptorTest fields more uniform, by using
uniform initialization syntax and initializer lists
- update service-api documentation for WiFi.Frequency

BUG=chromium:248791
TEST=unit tests, manual
CQ-DEPEND=CL:59119

Manual test
-----------
1. chrome://system
2. network-services -> Expand...
3. find GoogleGuest, check that it has at least one entry for
"WiFi.FrequencyList". e.g., "WiFi.FrequencyList/0: 2414"

Change-Id: Ie3b4d89853e22b7c4e80ad017738223d9753dd7c
Reviewed-on: https://gerrit.chromium.org/gerrit/59149
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
bebf1b8bce52b88c2cc2d93200b9405f9c19cf21 24-Apr-2013 mukesh agrawal <quiche@chromium.org> shill: make setting a property to its current value a no-op

Before this change, setting the EAP authentication properties
on a WiFiService would cause the connection to be dropped.
The connection would drop even if the new values were the same
as the old.

With this change, the connection is only dropped if the new
values differ from the old.

Overview of changes:
- AccessorInterface: have property setters return a bool (rather
than void). Setters should return true to indicate the value was
changed, and false otherwise.
- PropertyAccessor and derived classes:
- Implement the new AccessorInterface.
- Add tests that we implement the new AccessorInterface.
- Custom property setters (various classes):
- Update existing custom setters to return true if the value was
changed, and false otherwise.
- Add tests that custom setters implement the desired behavior.
- DBusAdaptor
- Change SetProperty to propagate the return value of
PropertyStore's setters, rather than Error::IsSuccess().
- In combination with other changes, this means
DBusAdaptor::SetProperty now returns false if the new value is
the same as the old.
- This also suppresses some spurious change notifications from
IPConfig, Manager, and Profile objects.
- Add tests that DBusAdaptor::SetProperty implements the desired
behavior.
- PropertyStore
- Add a change callback. This optional argument to the ctor is
invoked if a setter or clearer modified its property. This
is so that classes don't have to depend on their RPC adaptors
to inform them of a change. (See changes in Service.)
- Have setters pass through the return value of the Accessor,
rather than returning Error::IsSuccess(). In
combination with other changes, this means that setters
now returns false if the new value is the same as the old.
- Add tests that PropertyStore invokes the change callback
appropriately.
- ClearPropertyNonexistent, SetPropertyNonexistent: no callback
- ClearProperty: callback
- SetProperty: callback if and only if property changed
- Service
- Register OnPropertyChanged with PropertyStore, instead of relying
on a callback from ServiceDBusAdaptor. Two reasons for the change:
1) The RPC adaptors should be as trivial as possible, and
2) We can't test code in the RPC adaptors.
3) If we can't test code in the RPC adaptors, go to 1.
- ServiceDBusAdaptor: remove OnPropertyChange callback in SetProperty.
See Service for the rationale.
- Update existing SetProperty tests (various classes)
We now use values that differ from the current value of the property.
This ensures that the setter returns true.
- WiFiServiceTest: add a case to test that EAP authentication property
changes caused cached credentials to be cleared appropriately. This is
redundant given some of the other tests. But given that this was the
original problem in the bug, it seems worth testing specifically.
- HACKING: add some guidelines for what to do when adding properties.

While there:
- Change some HelpRegister... functions to HelpRegisterConst...
- Update some tests to check error.is_set() before reading
error.name(). This avoids a stray pointer dereference.
- Add SetStringmapsProperty to PropertyStore. This is needed because
PropertyStoreTypedTest now tests setters.
- Remove duplicate kAutoConnectProperty test case in ServiceTest.SetProperty
- Remove unused local in WiFiServiceTest.SetPassphraseRemovedCachedCredentials
- Remove unused method Device::HelpRegisterDerivedStrings
- Remove KeyValueStore from the set of types exercised by
PropertyStoreTypedTest. We only use KeyValueStore for const
properties, and PropertyStoreTypedTest tests setting and
clearing.
- Add PropertyChanges test to EthernetEapServiceTest.
BUG=chromium:233681
TEST=new unit tests

Change-Id: I9bdd89fbe6f19101dfcd5f126f2ba9c81533ff97
Reviewed-on: https://gerrit.chromium.org/gerrit/49733
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
6c1e3bbca64d642cb30ed9952203626942bc1451 07-Feb-2013 Thieu Le <thieule@chromium.org> shill: cellular: Add Network.Shill.Cellular.DropsPerHour.

BUG=chromium-os:38557
TEST=Unit tests, manually lose LTE signal and check chrome://histograms

Change-Id: I82aa1edabd21c5dfde4834cd36a34a12b629ba8f
Reviewed-on: https://gerrit.chromium.org/gerrit/42813
Reviewed-by: Arman Uguray <armansito@chromium.org>
Commit-Queue: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
e6e8e499adf14d9408a7e07f54b58d71ab3a9502 17-Jan-2013 Paul Stewart <pstew@chromium.org> shill: Remove PropertyStoreInspector

Remove PropertyStoreInspector, and move its methods internal to
PropertyStore. Service will soon need to inspect individual
properties, so it is time to move the inspection code out of
unit-test only code.

BUG=chromium-os:34525
TEST=Unit tests

Change-Id: I48fb7e459d2fca631a231700ee3050161b1df79b
Reviewed-on: https://gerrit.chromium.org/gerrit/41540
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
fc34925d45add6f1c81a42a7632621e69bfdc43e 30-Aug-2012 Han Shen <shenhan@google.com> Fix shill unittest build problem for gcc 4.7.

gcc 4.7 is more strict about type conversion in initilization list,
for example -

const char apple[] = {0xff, 0xfe};

The above compiles ok prior to gcc 4.7, but fails on gcc 4.7 with
-Wall -Werror. The reason is that 0xff is out of bound for (signed)
char type.

TEST=Built/tested using gcc 4.7
BUG=None

Change-Id: I597cac783954b856726494b757d69ddbc6c4436b
Reviewed-on: https://gerrit.chromium.org/gerrit/31908
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Han Shen <shenhan@chromium.org>
Tested-by: Han Shen <shenhan@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
e18c33bc332e558a51a1a29c20b00a935483fb96 11-Jul-2012 Paul Stewart <pstew@chromium.org> shill: Add uint64 properties

This is a fairly minimal addition, since we will only need
read-only derived types.

BUG=chromium-os:31584
TEST=New unit tests; list-devices on a real machine

Change-Id: I7b65224ae329443066f563b620b379f29006f8a0
Reviewed-on: https://gerrit.chromium.org/gerrit/27157
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
4682aa877598abf04e7ae0f13aa4166cac90be9d 31-May-2012 Darin Petkov <petkov@chromium.org> shill: Avoid double gets of property store values when iterating.

Cleanup and simplify the property iterator classes by removing the
unused PropertyConstIterator class and caching the property
value. This way we avoid deriving property values twice when iterating
through properties. Also, remove some incorrect and unused logic in
the PropertyStoreInspector related to handling errors coming from the
property store iterators.

BUG=chromium-os:30373
TEST=unit tests

Change-Id: Ie6ba2696f070e1ed43997f17273f48360f85055b
Reviewed-on: https://gerrit.chromium.org/gerrit/24201
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
b23d4b9d70662ec29349071a2235466c435136d6 16-Feb-2012 Eric Shienbrood <ers@chromium.org> shill: Fix marshalling of dictionary-valued properties.

The method DBusAdaptor::KeyValueStoreToVariant(), which was added to
allow for dictionary-valued properties such as Cellular.SIMLockStatus,
was incorrect. It was writing three maps - a string map, a bool
map, and a uint map, to the variant container. What it needs
to do is create a single a map of <string, variant> entries.

BUG=chromium-os:26498
TEST=Before this change, shill would crash either on startup, or
when a GetProperties call was made on the Device interface for a
cellular device. After the change, shill does not crash, and reports
the correct value for the device Cellular.SIMLockStatus property.

Change-Id: I9b297b759ed91c0d6db887c35bd870a51d080bd2
Reviewed-on: https://gerrit.chromium.org/gerrit/16043
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Eric Shienbrood <ers@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
6bb9e7c2c068fc15333babea8e66f02332683e33 30-Jan-2012 mukesh agrawal <quiche@chromium.org> shill: rename DispatchOnType to SetProperty

I think this name is clearer. While the function does
have to dispatch based on type, what the caller is trying
to do is to set a property.

BUG=None
TEST=unit tests
Change-Id: I7eedd5a74de7f465310d07271e61cff320645fd8
Reviewed-on: https://gerrit.chromium.org/gerrit/15538
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
4d260daebf9af9eeba028ad852878e9f2611b4ba 30-Jan-2012 mukesh agrawal <quiche@chromium.org> shill: teach PropertyStore how to clear properties

BUG=chromium-os:24814
TEST=new unit test

Change-Id: I2b9c770ad7bf40e7b312d169a94a829d81365eae
Reviewed-on: https://gerrit.chromium.org/gerrit/15290
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
63138a9b8249fd69c83a772ee3170551a589d57a 06-Feb-2012 Darin Petkov <petkov@chromium.org> shill: Add SIMLockEnabled to the SIM lock status properties and emit changes.

This patch replaces the StrIntPair class with the more generic KeyValueStore and
updates cellular's SIMLockStatus property to include the enabled key/value pair.

BUG=chromium-os:25850
TEST=unit tests

Change-Id: I2662cb468807e3afa04c3699e323f31282e1a50e
Reviewed-on: https://gerrit.chromium.org/gerrit/15325
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
3426c8fc7a3943f2d8fcb2ec78f0593088b42bed 12-Jan-2012 Thieu Le <thieule@chromium.org> shill: Move Metrics from singleton to Shill daemon

While implementing chromium-os:24810, it was discovered that Metrics is
cleaner if it is passed around like ControlInterface, Dispatcher,
Manager, etc. This approach also makes Metrics more testable.

BUG=chromium-os:24810
TEST=Unit tests, network_WiFiManager suite

Change-Id: I556a1bd11f21f0b93ecfeaae8855dfb99ed5e5f9
Reviewed-on: https://gerrit.chromium.org/gerrit/14099
Commit-Ready: Thieu Le <thieule@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
1b7a616197af7ff753dbe7614a8e207b1e10ac1a 09-Nov-2011 Gaurav Shah <gauravsh@chromium.org> shill: Implement write-only properties

Certain properties (e.g. WIFI Passphrase) are write only and must
not be returned when Service.GetProperties() is called over D-Bus.

This CL implements WriteOnlyProperties, a write-only analog of the
read-only ConstProperties.

Also add a ReadablePropertyConstIterator which only returns the
readable properties. Switch over DBus adaptor and PropertyStore
to use that.

BUG=chromium-os:21196
TEST=Added 2 new unittests.

Change-Id: I52815cc395650e0b49e1acac8d4954deeebcee5d
Reviewed-on: https://gerrit.chromium.org/gerrit/11402
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
26b327e559583d5a84b7e1605c29a4dcbc87d2a9 19-Oct-2011 Paul Stewart <pstew@chromium.org> shill: A couple of naming cleanups

Rename shill_event.* -> event_dispatcher.*. This is more
consistent with correct style. Also rename IOInputHandler ->
InputHandler.

BUG=None
TEST=Rerun unit tests

Change-Id: I13d56b857c85b32ba1418e894de68afc5a23f00d
Reviewed-on: http://gerrit.chromium.org/gerrit/10326
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
ffa3d0433d419aa9251f3768a0090a27b6b1c434 07-Oct-2011 mukesh agrawal <quiche@chromium.org> shill: allow property accessors to return an error message if a
property's value cannot be changed.

also, reduce some code duplication in property_store.cc

BUG=chromium-os:21384
TEST=unittests

Change-Id: Iaac8d40bbb9e9a1341d6c6d01642885d88ac0e27
Reviewed-on: http://gerrit.chromium.org/gerrit/8925
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
2176a88f197d802924d2a83d368e3efab7a6be4b 15-Sep-2011 Chris Masone <cmasone@chromium.org> [shill] Get rid of protected data members in PropertyStoreTest

BUG=chromium-os:19573
TEST=unit
STATUS=Verified

Change-Id: Ib3a2f19abb8cc4aa0e8410fc26bbb60891e35da7
Reviewed-on: http://gerrit.chromium.org/gerrit/7762
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
9d779936d8f8c2d74b30883e2a2622c4207fe797 26-Aug-2011 Chris Masone <cmasone@chromium.org> [shill] Add code for persisting profiles and services to disk.

BUG=chromium-os:17253
TEST=unit

Change-Id: Ic6dbbcb10543da3f4615cb305a77f6b9b301e8bc
Reviewed-on: http://gerrit.chromium.org/gerrit/7633
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
e4c0ace2ef3e2024609799b21037ab7036d0a360 24-Aug-2011 Darin Petkov <petkov@chromium.org> shill: Update Error to support all existing error types and default messages.

Also, added unit tests and a default Error::kSuccess error type to indicate a
default setting to lack of error.

BUG=chromium-os:19555
TEST=unit tests

Change-Id: Ib8a728f3a2363a654ad01219f6987f3a66944440
Reviewed-on: http://gerrit.chromium.org/gerrit/6594
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
2ae797d040b7261a5619c750e07037566bcb542b 24-Aug-2011 Chris Masone <cmasone@chromium.org> Re-land "[shill] Provide a cmd line toggle between flimflam and shill storage dirs"

This is so that we can easily switch to (and away from) using
the flimflam profile dir (and user profile dirs) when we start shill.

BUG=chromium-os:17253
TEST=unit

Change-Id: I0264162665607bb180688428c4640e42383ae355
Reviewed-on: http://gerrit.chromium.org/gerrit/6568
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
7156c923c9a9d2240ea9c62045337ac8c8f89e57 24-Aug-2011 Chris Masone <cmasone@chromium.org> Revert "[shill] Provide a cmd line toggle between flimflam and shill storage dirs"

This reverts commit 54c93e972563b713030a15ce3c1c1824800e317f

Change-Id: Id4bf4ee1e7e62efea5d116507d8b49d76a7a9556
Reviewed-on: http://gerrit.chromium.org/gerrit/6567
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
6402e501258c9f64373dcd05271c6c7dd75e20bc 23-Aug-2011 Chris Masone <cmasone@chromium.org> [shill] Provide a cmd line toggle between flimflam and shill storage dirs

This is so that we can easily switch to (and away from) using
the flimflam profile dir (and user profile dirs) when we start shill.

BUG=chromium-os:17253
TEST=unit

Change-Id: I9352cf5c40a8f77bcda8cdc0b5912782b4e342ed
Reviewed-on: http://gerrit.chromium.org/gerrit/6454
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
887f2983bc84acc15139df257e43217fec1f6cdb 15-Jul-2011 Darin Petkov <petkov@chromium.org> shill: Add a ModemInfo object that's a peer of DeviceInfo.

ModemInfo is responsible for managing ModemManager instances. Each ModemManager
instance watches for and handles an individual ModemManager DBus service. Each
ModemManager will be responsible for creating cellular devices associated with
that ModemManager.

BUG=chromium-os:17576
TEST=unit tests, tested on device

Change-Id: Ie9946cba4465aea8671305e32596fc9f6cca96e2
Reviewed-on: http://gerrit.chromium.org/gerrit/4124
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
889666b49d97f61a993a4e642e5728cce1c3758a 03-Jul-2011 Chris Masone <cmasone@chromium.org> [shill] Add support for weird Cellular.SimLockStatus property

SimLockStatus is bizarre in that its type is a dictionary that maps
names to values of different types. It's { string:string,
string:uint32 }, which doesn't fit nicely into dbus-c++, because you
can't represent it trivially with an STL container -- and therefore I
have to do something special to convert it.

BUG=chromium-os:17281
TEST=unit tests
STATUS=Verified

Change-Id: I9c4e43f75c666570caae66e04293bce6207a1b99
Reviewed-on: http://gerrit.chromium.org/gerrit/3619
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
8a56ad63b73d221a0f20fd61d1f27bcc443eec50 03-Jul-2011 Chris Masone <cmasone@chromium.org> [shill] Move some simple unit tests to property_store_unittest.cc

BUG=None
TEST=unit tests

Change-Id: Ib5ee4b3c2654c193227a3b789cbb6f40e5222b85
Reviewed-on: http://gerrit.chromium.org/gerrit/3617
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
a8a2c25df27d77f278511769f0c9029b03dff053 28-Jun-2011 Chris Masone <cmasone@chromium.org> [shill] Enable the getting of properties, and wire to dbus.

PropertyStore exposes getters for iterators pointing to the beginning
and end of its property maps, and a static utility method in DBusAdaptor
uses these to iterate through all the properties in the PropertyStore and build
up a map of property name -> DBus::Variant-wrapped value.

BUG=chromium-os:16343
TEST=unit tests

Change-Id: I85ebbaee167ab2feed0fcf8fe654274de352aca0
Reviewed-on: http://gerrit.chromium.org/gerrit/3359
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/property_store_unittest.cc
b925cc8f481d21fddd9569fc68861f6e5b6e3eae 23-Jun-2011 Chris Masone <cmasone@chromium.org> [shill] Add properties to Manager, Device and subclasses. Clean up unit tests

1) Pull much of the properties stuff (the maps, Register*(), Contains()) up
into PropertyStore, and make it a class, not an interface.
2) Add proper property stuff to Manager and Device. Move Cellular- and Wifi-
specific properties to Cellular, CellularService, WiFi, WiFiService as
appropriate.
3) clean up unit tests.

BUG=chromium-os:16343
TEST=unit tests

Change-Id: Iba88f384a5fbe383608cb79fa2134d978f1b81e8
Reviewed-on: http://gerrit.chromium.org/gerrit/3136
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/property_store_unittest.cc