[rfc][icedtea-web] AWTFramework and sample reproducers using it
jvanek at redhat.com
Thu Apr 25 03:16:02 PDT 2013
On 04/24/2013 07:27 PM, Jana Fabrikova wrote:
Looks good to me.
Just cosmetic changes:
ImageSeeker, componentfinder, keybvoardAction,mouseAction - missing license
componentNotFound, awtformatexception - please format code
all jnlp and html files missing headers (yah they exists too :) and vendor RedHat should be
findAppletByIcon - this name is to strict for it generic action
I would suggest findIcon as base method (which will find left upper corner). Then maybe
findApplication or findWindow for rest.
And actually findIcon will sustain my desired findPattern methods from "btw" below.
When thinking about it - marker.png should be also available from
tests/test-extensions/net/sourceforge/jnlp/awt(/imagesearch) (via classLoader.getResource...(), and
cached as final static image, so the (futre) findIcon(BufferedImage) will be overloaded by
What do you think?
The wiki manual will be necessary for this, but can go inside as separate change set.
One possible destination is on classpath wiki, and second may be on as package-info.java file in
In both should be just current basic info and principles. Rest shouldbe readable from javadoc (all
possible as another change set, but javadoc looks already good to me)
Javadoc is missing in new exception classes, but I do not insists...
Btw - is there some method "findPatternOnScreens(BufferedImage
pattern),findPatternOnImage(BufferedImage pattern, BufferedImage source) " ? I believe they are
somewhere as bases, but I have not found them. Otherwise I looked over your shoulder during
development and api looks clear and well described
One implementation hint:
Your testcases are laoding patterns from - buttonIcon = ImageIO.read(new File(test_server_dir_path
+ "/greenbutton.png")); - it is very wrong. those images (not shared with reprodcuers) MUST be in
testcas directory, and read as clasloader.getResoource...(). Maybe that change in compilation of
testcases (Makefile.am) will be needed (to get those images on classapth)
Of course the marker.png must be shared both in testextensions calsspath and in reproducer :(
I would suggest split the patch - to push the test framework asap (with comsetic changes applied)
And push reproducers little bit later after one more round.
One implementation ensurement - I was aware thet epiphany ( or other different suspicious browser)
was showing new tab as hidden. Do you noted that ?
If so then I'm for disabling it in all AWT tests in same way as you have disabled opera for some JS
Thanx for all the work on this!
As some further patch some tests to this extensions will be worthy.
 found! Sorry findExactImage/blurred iamge! And as screenshot is oneline of code I do nt think it
(the findPatternOnScreens(BufferedImage pattern)) is worthy of labour. Sorry.
> the big AWTFramework patch is in the attachment, together with three
> pictures used by the reproducers.
> Thanks for any comments,
> 2013-04-24 Jana Fabrikova <jfabriko at redhat.com>
> * /tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java:
> added a getter method getRules
> * tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java:
> the most important class of AWTFramework, combines closing listener and
> possibility to use mouse and keyboard for input to tests
> exception that is raised in the framework whenever programmer did not
> provide enough information
> class with utility keyboard methods
> class with utility mouse methods
> class for finding components in a screenshot
> exception that can be raised if an important component could not be
> class for general image searching
> * tests/reproducers/simple/AWTCommonResourcesOnly/resources/marker.png:
> reproducer with resources only, contains the default icon marking
> 1st reproducer: browser tests for mouse clicking on a button in applet,
> applet is found using an icon, button is found using colors and in
> one case also icon - greenbutton.png
> 2nd reproducer: javaws tests - the same as above, only buttons found
> by color
> 3rd reproducer: javaws tests - applet with two labeled buttons,
> the applet is found using an icon,
> mouse finds the button ButtonA by serching for icon buttonA.png
More information about the distro-pkg-dev