Lines Matching refs:accumulator
129 MessageAccumulator accumulator(run_loop.QuitClosure());
130 connector1.set_incoming_receiver(&accumulator);
134 ASSERT_FALSE(accumulator.IsEmpty());
137 accumulator.Pop(&message_received);
157 MessageAccumulator accumulator;
158 connector1.set_incoming_receiver(&accumulator);
162 ASSERT_FALSE(accumulator.IsEmpty());
165 accumulator.Pop(&message_received);
179 MessageAccumulator accumulator(run_loop.QuitClosure());
180 connector1.set_incoming_receiver(&accumulator);
191 ASSERT_FALSE(accumulator.IsEmpty());
194 accumulator.Pop(&message_received);
216 MessageAccumulator accumulator;
217 connector1.set_incoming_receiver(&accumulator);
220 if (accumulator.IsEmpty()) {
222 accumulator.set_closure(run_loop.QuitClosure());
225 ASSERT_FALSE(accumulator.IsEmpty());
228 accumulator.Pop(&message_received);
251 MessageAccumulator accumulator;
252 connector1.set_incoming_receiver(&accumulator);
256 ASSERT_FALSE(accumulator.IsEmpty());
259 accumulator.Pop(&message_received);
265 ASSERT_TRUE(accumulator.IsEmpty());
318 MessageAccumulator accumulator(run_loop.QuitClosure());
319 connector1.set_incoming_receiver(&accumulator);
323 ASSERT_FALSE(accumulator.IsEmpty());
326 accumulator.Pop(&message_received);
387 ConnectorDeletingMessageAccumulator accumulator(&connector1);
388 connector1->set_incoming_receiver(&accumulator);
393 ASSERT_FALSE(accumulator.IsEmpty());
396 accumulator.Pop(&message_received);
418 ReentrantMessageAccumulator accumulator(&connector1);
419 connector1.set_incoming_receiver(&accumulator);
422 if (accumulator.IsEmpty()) {
424 accumulator.set_closure(run_loop.QuitClosure());
427 ASSERT_FALSE(accumulator.IsEmpty());
430 accumulator.Pop(&message_received);
437 ASSERT_EQ(2, accumulator.number_of_calls());
470 MessageAccumulator accumulator(run_loop3.QuitClosure());
471 connector1.set_incoming_receiver(&accumulator);
476 ASSERT_FALSE(accumulator.IsEmpty());
479 accumulator.Pop(&message_received);
523 // Configure the accumulator such that it pauses after the first message is
525 MessageAccumulator accumulator(
528 connector1.set_incoming_receiver(&accumulator);
534 ASSERT_EQ(1u, accumulator.size());
537 void AccumulateWithNestedLoop(MessageAccumulator* accumulator,
542 accumulator->set_closure(nested_run_loop.QuitClosure());
563 MessageAccumulator accumulator;
564 // When the accumulator gets the first message it spins a nested message
566 accumulator.set_closure(base::Bind(&AccumulateWithNestedLoop, &accumulator,
568 connector1.set_incoming_receiver(&accumulator);
572 ASSERT_EQ(2u, accumulator.size());