Sets the default_result_printer attribute to the provided listener. The listener is also added to the listener list and previous default_result_printer is removed from it and deleted. The listener can also be NULL in which case it will not be added to the list. Does nothing if the previous and the current listener objects are the same.
| 6003 | // also be NULL in which case it will not be added to the list. Does |
| 6004 | // nothing if the previous and the current listener objects are the same. |
| 6005 | void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) { |
| 6006 | if (default_result_printer_ != listener) { |
| 6007 | // It is an error to pass this method a listener that is already in the |
| 6008 | // list. |
| 6009 | delete Release(default_result_printer_); |
| 6010 | default_result_printer_ = listener; |
| 6011 | if (listener != nullptr) Append(listener); |
| 6012 | } |
| 6013 | } |
| 6014 | |
| 6015 | // Sets the default_xml_generator attribute to the provided listener. The |
| 6016 | // listener is also added to the listener list and previous |