+
+
+#if wxUSE_TOOLBAR
+ // Also check that toolbar events get forwarded to the active child.
+ wxToolBar* const tb = parent->CreateToolBar(wxTB_NOICONS);
+ tb->AddTool(wxID_APPLY, "Apply", wxNullBitmap);
+ tb->Realize();
+
+ // As in CheckMenuEvent(), use toolbar method actually sending the event
+ // instead of bothering with wxUIActionSimulator which would have been
+ // trickier.
+ g_str.clear();
+ tb->OnLeftClick(wxID_APPLY, true /* doesn't matter */);
+
+ CPPUNIT_ASSERT_EQUAL( "advmcpA", g_str );
+#endif // wxUSE_TOOLBAR