From: Dmitry K. <in...@us...> - 2010-06-13 18:42:27
|
Update of /cvsroot/winguitest/Win32-GuiTest/t In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv20874/t Modified Files: 01_basic.t 02_calc.t Log Message: (bug #56282) apply patch from Michael Roberts to fix tests under Windows 7 Index: 02_calc.t =================================================================== RCS file: /cvsroot/winguitest/Win32-GuiTest/t/02_calc.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 02_calc.t 28 Mar 2009 22:36:34 -0000 1.3 --- 02_calc.t 13 Jun 2010 18:42:19 -0000 1.4 *************** *** 24,34 **** { system("cmd /c start calc"); ! my ($calc) = WaitWindowLike($desk, undef, "^SciCalc\$"); # hmm, It seems the SciCalc is the name of the class for both the Standard and the # Scientific version of the calculator ! ok(IsWindow($calc)); SetForegroundWindow($calc); MenuSelect("&View|&Scientific"); SendKeys("%{F4}"); --- 24,40 ---- { system("cmd /c start calc"); ! my ($calc) = WaitWindowLike($desk, undef, "^SciCalc\$|^CalcFrame"); # hmm, It seems the SciCalc is the name of the class for both the Standard and the # Scientific version of the calculator ! ok(IsWindow($calc)); SetForegroundWindow($calc); + if (GetClassName($calc) eq "CalcFrame") { + print STDERR "# Windows 7 calculator is toooo weird!\n"; + SendKeys("%{F4}"); + exit; + } + MenuSelect("&View|&Scientific"); SendKeys("%{F4}"); *************** *** 36,40 **** system("cmd /c start calc"); ! my ($calc) = WaitWindowLike($desk, undef, "^SciCalc\$"); SendKeys("1969"); --- 42,46 ---- system("cmd /c start calc"); ! my ($calc) = WaitWindowLike($desk, undef, "^SciCalc\$|^CalcFrame"); SendKeys("1969"); Index: 01_basic.t =================================================================== RCS file: /cvsroot/winguitest/Win32-GuiTest/t/01_basic.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 01_basic.t 1 Oct 2008 11:10:12 -0000 1.2 --- 01_basic.t 13 Jun 2010 18:42:19 -0000 1.3 *************** *** 69,72 **** --- 69,73 ---- is($waitwin[0], $windows[0], "WindowIDs are identical"); + SetForegroundWindow($windows[0]); SendKeys(<<EOM, 10); This is a test message, |