mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Merge branch 'google3' up to cl/358285146.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "core/internal/endpoint_channel_manager.h"
|
||||
#include "core/internal/endpoint_manager.h"
|
||||
#include "core/internal/mediums/mediums.h"
|
||||
#include "core/internal/mediums/utils.h"
|
||||
#include "platform/public/system_clock.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
@@ -56,6 +57,23 @@ TEST(BwuManagerTest, CanInitiateBwu) {
|
||||
bwu_manager.Shutdown();
|
||||
}
|
||||
|
||||
TEST(BwuManagerTest, CanProcessPathAvailableFrame) {
|
||||
ClientProxy client;
|
||||
std::string endpoint_id("EP_A");
|
||||
Mediums mediums;
|
||||
EndpointChannelManager ecm;
|
||||
EndpointManager em{&ecm};
|
||||
BwuManager bwu_manager{mediums, em, ecm, {}, {}};
|
||||
|
||||
LocationHint location_hint = Utils::BuildLocationHint("US");
|
||||
ExceptionOr<OfflineFrame> wrapped_frame = parser::FromBytes(
|
||||
parser::ForBwuWebrtcPathAvailable("my_id", location_hint));
|
||||
|
||||
bwu_manager.OnIncomingFrame(wrapped_frame.result(), endpoint_id, &client,
|
||||
Medium::WEB_RTC);
|
||||
bwu_manager.Shutdown();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace connections
|
||||
} // namespace nearby
|
||||
|
||||
Reference in New Issue
Block a user