chrome.networkingPrivate.createNetwork doesn't return GUID |
||||
Issue descriptionPer https://developer.chrome.com/extensions/networkingPrivate#method-createNetwork the callback function should be invoked with the GUID of the new connection. Instead, it is invoked with the shill service name (e.g. "/service/161"). This isn't very helpful, because other functions like forgetNetwork() want to refer to networks using the GUID.
,
Mar 9 2016
I noticed that the createNetwork() test in chrome/test/data/extensions/api_test/networking_private/chromeos/test.js is checking the GUID and should have caught this bug, but I couldn't figure out how to run the test. This is what I tried: export GYP_DEFINES="use_goma=1 chromeos=1 component=shared_library" ninja -j1000 -C out/Debug browser_tests && ./out/Debug/browser_tests --disable-setuid-sandbox --gtest_filter="NetworkingPrivateApiTest.CreateNetwork" This seems to run networking_private_apitest.cc, not networking_private_chromeos_apitest.cc. If I change the former file to force the test to fail, the test does fail. If I break the latter file, it doesn't fail. Also, if I delete all of the code from test.js, the test still passes. Is this operator error, or a symptom of a larger problem?
,
Mar 9 2016
Once upon a time, "guid" and "service_path" were synonymous. Some tests may still play a bit fast and loose with them, Both NetworkingPrivateApiTest and NetworkingPrivateChromeOSApiTest run on chromeos (the former tests just the API, the latter sets up a fake implementation and does more involved testing). The filter for the chromeos tests would be "NetworkingPrivateApiTest.*" It would be great to update that test to set "service_path" and "guid" to different values and ensure that the guid is indeed returned.
,
Mar 15 2016
,
Mar 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f1da84b10359d62c67a73e46da90b0d0510a0768 commit f1da84b10359d62c67a73e46da90b0d0510a0768 Author: cernekee <cernekee@chromium.org> Date: Tue Mar 15 23:33:03 2016 Invoke createNetwork() callback with GUID, not service name The current implementation doesn't match the API spec. Fix this. BUG= 593196 TEST=go to chrome://settings/network , ctrl-shift-i, run in console: chrome.networkingPrivate.createNetwork(false, {"Type":"WiFi","WiFi":{"SSID":"GoogleGuest","AutoConnect":true}}, function(x) { console.log(x); }) Review URL: https://codereview.chromium.org/1779633002 Cr-Commit-Position: refs/heads/master@{#381347} [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chrome/browser/chromeos/login/helper.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chrome/browser/chromeos/login/helper.h [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chrome/browser/chromeos/net/onc_utils.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chrome/browser/extensions/api/vpn_provider/vpn_provider_apitest.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chrome/browser/sync/test/integration/wifi_credentials_helper_chromeos.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/managed_network_configuration_handler.h [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/managed_network_configuration_handler_impl.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/managed_network_configuration_handler_impl.h [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/mock_managed_network_configuration_handler.h [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/network_configuration_handler.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/network_configuration_handler.h [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/network_configuration_handler_unittest.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/chromeos/network/network_handler_callbacks.h [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/components/wifi_sync/wifi_config_delegate_chromeos.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/extensions/browser/api/networking_private/networking_private_chromeos.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/extensions/browser/api/vpn_provider/vpn_service.cc [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/extensions/browser/api/vpn_provider/vpn_service.h [modify] https://crrev.com/f1da84b10359d62c67a73e46da90b0d0510a0768/ui/chromeos/network/network_connect.cc
,
Apr 11 2016
,
Apr 12 2016
Samus 8172.1.0. Tested as per comment#5. |
||||
►
Sign in to add a comment |
||||
Comment 1 by steve...@chromium.org
, Mar 9 2016