aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-02-27 13:49:15 +0100
committerDan Gudmundsson <[email protected]>2012-02-27 13:49:15 +0100
commit6628dbe4ba097a5abed4ca7439a5b515adb0f556 (patch)
treead19d4e40ab4e408fa0e82fa2a97d6f433192f61 /lib
parent4b10c0f1b6253a6d3bbf1a04a07ebc9dc83c5c45 (diff)
downloadotp-6628dbe4ba097a5abed4ca7439a5b515adb0f556.tar.gz
otp-6628dbe4ba097a5abed4ca7439a5b515adb0f556.tar.bz2
otp-6628dbe4ba097a5abed4ca7439a5b515adb0f556.zip
[wx] Add simple taskbaricon test
Diffstat (limited to 'lib')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index b75b0cc74e..6ed7243c5b 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -50,7 +50,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[calendarCtrl, treeCtrl, notebook, staticBoxSizer,
clipboard, helpFrame, htmlWindow, listCtrlSort, listCtrlVirtual,
- radioBox, systemSettings].
+ radioBox, systemSettings, taskBarIcon].
groups() ->
[].
@@ -470,3 +470,15 @@ textCtrl(Config) ->
wxTextAttr:destroy(Attr),
wxWindow:show(Frame),
wx_test_lib:wx_destroy(Frame,Config).
+
+taskBarIcon(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+taskBarIcon(Config) ->
+ Wx = wx:new(),
+ Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
+ TBI = wxTaskBarIcon:new(),
+ Icon = wxIcon:new(filename:join(code:priv_dir(debugger), "erlang_bug.png")),
+ wxTaskBarIcon:setIcon(TBI, Icon, [{tooltip, "Testing wxTaskBarIcon"}]),
+ wxWindow:show(Frame),
+ wxTaskBarIcon:connect(TBI, taskbar_left_down, [{callback, fun(Ev,_) -> io:format("Left clicked: ~p~n",[Ev]) end}]),
+ wxTaskBarIcon:connect(TBI, taskbar_right_down, [{callback,fun(Ev,_) -> io:format("Right clicked: ~p~n",[Ev]) end}]),
+ wx_test_lib:wx_destroy(Frame,Config).