mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
WifiLan::Change GetUpgradeAddressCandidates to use ServiceAddress.
PiperOrigin-RevId: 842257461
This commit is contained in:
committed by
Copybara-Service
parent
8e597c9df0
commit
4652aef48c
@@ -27,6 +27,7 @@
|
||||
#include "connections/medium_selector.h"
|
||||
#include "internal/platform/byte_array.h"
|
||||
#include "internal/platform/exception.h"
|
||||
#include "internal/platform/wifi_credential.h"
|
||||
|
||||
namespace nearby {
|
||||
namespace connections {
|
||||
@@ -686,13 +687,13 @@ TEST(OfflineFramesValidatorTest,
|
||||
TEST(OfflineFramesValidatorTest,
|
||||
ValidateWifiLanUpgradeFrameWithAddressCandidatesSucceeds) {
|
||||
OfflineFrame offline_frame;
|
||||
std::vector<std::string> address_candidates = {
|
||||
std::string(
|
||||
"\x2a\x00\x79\xe0\x2e\x87\x00\x06\xb7\x28\x67\x45\x7a\xdd\x01\x53",
|
||||
16),
|
||||
std::string("\xc0\xa8\x00\x01", 4),
|
||||
std::vector<ServiceAddress> address_candidates = {
|
||||
{{'\x2a', '\x00', '\x79', '\xe0', '\x2e', '\x87', '\x00', '\x06', '\xb7',
|
||||
'\x28', '\x67', '\x45', '\x7a', '\xdd', '\x01', '\x53'},
|
||||
kPort},
|
||||
{{'\xc0', '\xa8', '\x00', '\x01'}, kPort},
|
||||
};
|
||||
ByteArray bytes = ForBwuWifiLanPathAvailable(address_candidates, kPort);
|
||||
ByteArray bytes = ForBwuWifiLanPathAvailable(address_candidates);
|
||||
offline_frame.ParseFromString(std::string(bytes));
|
||||
|
||||
auto ret_value = EnsureValidOfflineFrame(offline_frame);
|
||||
|
||||
Reference in New Issue
Block a user