History log of /system/connectivity/shill/service_property_change_test.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/service_property_change_test.h
1a212a6b98b22ad1d69652bb26a9e94138635476 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: Top-level files n-v: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: I8bd6f66ea185ca3a2687986f6f2fd99be957dffe
Reviewed-on: https://chromium-review.googlesource.com/278070
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/service_property_change_test.h
c45688bb3881f0c2216e6ec0e19ebda0be33e871 03-Jul-2014 Ben Chan <benchan@chromium.org> shill: Fix header guards to conform to coding style.

BUG=chromium:385849
TEST=Tested the following:
1. `USE='cellular wimax' FEATURES=test emerge-$BOARD platform2`
2. `cpplint.py --filter=-build/include_order shill/*.h` reports no
'build/header_guard' issue.

Change-Id: I1a3972a1f88e5001550eccd561633bd4e5c5faba
Reviewed-on: https://chromium-review.googlesource.com/206680
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/service_property_change_test.h
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/service_property_change_test.h
cbfb34e699532f62eb5b381d0ea3a15d39e00b7c 18-Apr-2013 mukesh agrawal <quiche@chromium.org> shill: Emit more property change notifications for Services.

Add property change notifications for all the Service properties that
Chrome currently pays attention to. Also add unit tests for these
property change notifications.

While there:
- add some more tips to TESTING
- update service-api documentation for AutoConnect
(it is settable for non-favorite services, and has been for
some time)
- update some ServiceTests to no longer set_favorite before
changing AutoConnect (set_favorite is no longer necessary,
as noted above)
- clarify service-api documentation for Device property
- make the security_ field of WiFiService const (it is only
set in the ctor, and designating it const makes it obvious
why there's no property change for it)
- fix bug where VPNService would change the Favorite property,
but not signal the change

BUG=chromium:230329
TEST=new unit tests

Change-Id: Ia387b1ab90fa80fd218cd69e0fd8126ff4c5a2ae
Reviewed-on: https://gerrit.chromium.org/gerrit/48459
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/service_property_change_test.h