Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIvan Furnadjiev2011-02-01 08:52:44 +0000
committerIvan Furnadjiev2011-02-01 08:52:44 +0000
commitc9dd5c8b4fb86080651c8deeff67f4388282ca02 (patch)
treee89c34cd49ea21d0c105093f55c7014554796c69 /tests
parent7f241cddfda96271bffa3a502703068173d21192 (diff)
downloadorg.eclipse.rap-c9dd5c8b4fb86080651c8deeff67f4388282ca02.tar.gz
org.eclipse.rap-c9dd5c8b4fb86080651c8deeff67f4388282ca02.tar.xz
org.eclipse.rap-c9dd5c8b4fb86080651c8deeff67f4388282ca02.zip
Proper fix - bug 328437: MenuItem with RADIO style doesn't pass selection event to it's listeners
https://bugs.eclipse.org/bugs/show_bug.cgi?id=328437
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js11
-rw-r--r--tests/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js11
2 files changed, 20 insertions, 2 deletions
diff --git a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js
index 89740b6817..f6313da61b 100644
--- a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js
+++ b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved.
+ * Copyright (c) 2009, 2011 EclipseSource and others. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -524,6 +524,15 @@ qx.Class.define( "org.eclipse.rwt.test.tests.MenuTest", {
assertContains( "w1.selection=false", msg );
assertContains( "w2.selection=true", msg );
this.testUtil.clearRequestLog();
+ // bug 328437
+ this.testUtil.click( item2 );
+ assertFalse( this.menuItem.hasState( "selected" ) );
+ assertTrue( item2.hasState( "selected" ) );
+ assertEquals( 1, this.testUtil.getRequestsSend() );
+ var msg = this.testUtil.getMessage();
+ assertContainsNot( "w1.selection=false", msg );
+ assertContains( "w2.selection=true", msg );
+ this.testUtil.clearRequestLog();
this.disposeMenu();
},
diff --git a/tests/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js b/tests/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js
index 89740b6817..f6313da61b 100644
--- a/tests/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js
+++ b/tests/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/MenuTest.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved.
+ * Copyright (c) 2009, 2011 EclipseSource and others. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -524,6 +524,15 @@ qx.Class.define( "org.eclipse.rwt.test.tests.MenuTest", {
assertContains( "w1.selection=false", msg );
assertContains( "w2.selection=true", msg );
this.testUtil.clearRequestLog();
+ // bug 328437
+ this.testUtil.click( item2 );
+ assertFalse( this.menuItem.hasState( "selected" ) );
+ assertTrue( item2.hasState( "selected" ) );
+ assertEquals( 1, this.testUtil.getRequestsSend() );
+ var msg = this.testUtil.getMessage();
+ assertContainsNot( "w1.selection=false", msg );
+ assertContains( "w2.selection=true", msg );
+ this.testUtil.clearRequestLog();
this.disposeMenu();
},

Back to the top