Lines Matching refs:delegate

86 static TestInspectorDelegate* delegate = nullptr;
90 GTEST_ASSERT_EQ(delegate, d);
106 delegate = nullptr;
162 SPIN_WHILE(delegate != nullptr);
231 delegate = new TestInspectorDelegate();
232 delegate->SetInspector(
234 InspectorSocket::DelegatePointer(delegate)));
235 GTEST_ASSERT_NE(nullptr, delegate);
374 SPIN_WHILE(delegate != nullptr);
385 ASSERT_FALSE(delegate->inspector_ready);
387 SPIN_WHILE(!delegate->inspector_ready);
393 delegate->Write(SERVER_MESSAGE, sizeof(SERVER_MESSAGE) - 1);
400 delegate->ExpectData(CLIENT_MESSAGE, sizeof(CLIENT_MESSAGE) - 1);
469 delegate->ExpectData(EXPECT, sizeof(EXPECT) - 1);
474 ASSERT_FALSE(delegate->inspector_ready);
481 ASSERT_FALSE(delegate->inspector_ready);
483 ASSERT_FALSE(delegate->inspector_ready);
485 SPIN_WHILE(!delegate->inspector_ready);
492 delegate->last_event = kInspectorHandshakeUpgraded;
496 GTEST_ASSERT_EQ(nullptr, delegate);
512 ASSERT_FALSE(delegate->inspector_ready);
514 SPIN_WHILE(!delegate->inspector_ready);
515 ASSERT_TRUE(delegate->inspector_ready);
519 SPIN_WHILE(delegate != nullptr);
526 ASSERT_FALSE(delegate->inspector_ready);
529 ASSERT_TRUE(delegate->inspector_ready);
536 delegate->ExpectData(CLIENT_MESSAGE, sizeof(CLIENT_MESSAGE) - 1);
547 delegate->Close();
552 delegate->FailOnWsFrame();
554 SPIN_WHILE(delegate != nullptr);
560 delegate->Close();
589 switch (delegate->handshake_events) {
595 delegate->Write(TEST_SUCCESS, sizeof(TEST_SUCCESS) - 1);
609 ReportsHttpGet_eventsCount = delegate->handshake_events;
613 delegate->SetDelegate(ReportsHttpGet_handshake);
638 EXPECT_EQ(nullptr, delegate);
646 switch (delegate->handshake_events - 1) {
656 HandshakeCanBeCanceled_eventCount = delegate->handshake_events;
660 delegate->SetDelegate(HandshakeCanBeCanceled_handshake);
666 EXPECT_EQ(nullptr, delegate);
673 switch (delegate->handshake_events - 1) {
677 delegate->Write(TEST_SUCCESS, sizeof(TEST_SUCCESS) - 1);
690 delegate->SetDelegate(GetThenHandshake_handshake);
699 EXPECT_EQ(2, delegate->handshake_events);
707 delegate->Write(MESSAGE1, sizeof(MESSAGE1) - 1);
708 delegate->Write(MESSAGE2, sizeof(MESSAGE2) - 1);
711 SPIN_WHILE(delegate != nullptr);
723 SPIN_WHILE(delegate != nullptr);
728 delegate->Write(MESSAGE, sizeof(MESSAGE) - 1);
731 SPIN_WHILE(delegate != nullptr);
750 ASSERT_FALSE(delegate->inspector_ready);
752 SPIN_WHILE(!delegate->inspector_ready);
767 delegate->Write(message.data(), message.size());
782 delegate->ExpectData(message.data(), message.size());
798 SPIN_WHILE(delegate != nullptr);
803 ASSERT_FALSE(delegate->inspector_ready);
805 SPIN_WHILE(!delegate->inspector_ready);
811 delegate->Write(SERVER_MESSAGE, sizeof(SERVER_MESSAGE) - 1);
814 delegate->Close();
819 delegate->WaitForDispose();
830 delegate->SetDelegate(shouldnt_be_called);
834 SPIN_WHILE(delegate != nullptr);