google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

ImageBundleCreateHandler$OverrideImagePrototype does not override AbstractImagePrototype.createElement() #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run included test

What is the expected output? What do you see instead?

com.octo.gwt.test.exceptions.ReflectionException: Error while calling 
'ContentPanel.onAttach(..)'
    at com.octo.gwt.test.utils.GwtReflectionUtils.callPrivateMethod(GwtReflectionUtils.java:55)
    at com.octo.gwt.test.utils.GwtReflectionUtils.callPrivateMethod(GwtReflectionUtils.java:72)
    at com.octo.gxt.test.internal.patchers.ComponentHelperPatcher.doAttachNative(ComponentHelperPatcher.java:14)
    at com.extjs.gxt.ui.client.widget.ComponentHelper.doAttachNative(ComponentHelper.java)
    at com.extjs.gxt.ui.client.widget.ComponentHelper.doAttach(ComponentHelper.java:21)
    at com.extjs.gxt.ui.client.widget.Container.attachChildren(Container.java:635)
...........................
Caused by: java.lang.UnsupportedOperationException
    at com.google.gwt.user.client.ui.AbstractImagePrototype.createElement(AbstractImagePrototype.java:110)
    at com.extjs.gxt.ui.client.widget.button.Button.setIcon(Button.java:346)
    at com.extjs.gxt.ui.client.widget.button.Button.afterRender(Button.java:504)
    at com.extjs.gxt.ui.client.widget.Component.render(Component.java:1111)
    at com.extjs.gxt.ui.client.widget.Layout.renderComponent(Layout.java:361)

What version of the product are you using? On what operating system?
Linux
gwt-test-utils Version 0.30

Test:

import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.ContentPanel;

    @Test
    public void testWindow(){
        Window window = new Window();
        ContentPanel panel = new ContentPanel();
        Button button = new Button();
        AbstractImagePrototype imagePrototype = new PagingToolBar.PagingToolBarImages().getRefresh();
        button.setIcon(imagePrototype);
        panel.add(button);
        window.add(panel);
        window.show();

        Assert.assertEquals(imagePrototype, button.getIcon());
        Assert.assertTrue(window.isVisible());
    }

Original issue reported on code.google.com by Andrzej....@gmail.com on 27 Jun 2011 at 12:43

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 27 Jun 2011 at 2:53

GoogleCodeExporter commented 9 years ago
I just deployed a new 0.31-SNAPSHOT with a fix for this. Can you give it a try 
so I could close this issue ?

Original comment by gael.laz...@gmail.com on 27 Jun 2011 at 9:46

GoogleCodeExporter commented 9 years ago
This test passed (but I still have one test which failed. There is a lot of 
logic and internal dependencies, so I will not include it now) 

Original comment by Andrzej....@gmail.com on 28 Jun 2011 at 9:48

GoogleCodeExporter commented 9 years ago
If your failing test deals with AbstractImagePrototype to, you should try the 
lastest 0.31-SNAPSHOT I just deployed. It include a total refactor of the 
AbstractImagePrototype support.

Original comment by gael.laz...@gmail.com on 4 Jul 2011 at 8:29

GoogleCodeExporter commented 9 years ago
Only one test failed - but it is hard to reproduce it (the same test as before 
I mention but it has a lot of components - it is hard to reproduce).

Original comment by Andrzej....@gmail.com on 5 Jul 2011 at 7:41

GoogleCodeExporter commented 9 years ago
Is your failure relative to gwt-test-utils ? If so, could you at least provide 
your error stacktrace in another issue ?

Since AbstractImagePrototype.createElement() has been patched, Do you think I 
can close this issue ?

Original comment by gael.laz...@gmail.com on 22 Jul 2011 at 8:51

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 21 Aug 2011 at 9:14