src/media/audio/audio_core/test/api/audio_capturer_test.cc
// inadequate ZX_RIGHTS -- no READ should cause GetReferenceClock to fail.
inadequate ZX_RIGHTS -- no READ should cause GetReferenceClock to fail.
inadequate ZX_RIGHTS -- no READ should cause GetReferenceClock to fail .
TEST_F(AudioCapturerClockTest, SetRefClock_NoReadShouldDisconnect) {
  zx::clock dupe_clock, orig_clock = clock::CloneOfMonotonic();
  ASSERT_EQ(orig_clock.duplicate(kClockRights & ~ZX_RIGHT_READ, &dupe_clock), ZX_OK);
  audio_capturer_->SetReferenceClock(std::move(dupe_clock));
  ExpectDisconnect(audio_capturer_);
}
TEST_F ( AudioCapturerClockTest , SetRefClock_NoReadShouldDisconnect ) { zx :: clock dupe_clock , orig_clock = clock :: CloneOfMonotonic ( ) ; ASSERT_EQ ( orig_clock . duplicate ( kClockRights & ~ ZX_RIGHT_READ , & dupe_clock ) , ZX_OK ) ; audio_capturer_ -> SetReferenceClock ( std :: move ( dupe_clock ) ) ; ExpectDisconnect ( audio_capturer_ ) ; }
inadequate ZX_RIGHTS -- no READ should cause GetReferenceClock to fail.
inadequate ZX_RIGHTS -- no READ should cause GetReferenceClock to fail .