|
Lines 144-149
Link Here
|
| 144 |
combo.destroy(); |
144 |
combo.destroy(); |
| 145 |
}, |
145 |
}, |
| 146 |
|
146 |
|
|
|
147 |
testTextfieldFocus : function() { |
| 148 |
// See Bug 346065 - [Combo] Selection can sometimes not be changed with key up/down in FF4 |
| 149 |
if( org.eclipse.rwt.Client.isGecko() && org.eclipse.rwt.Client.getVersion() >= 2 ) { |
| 150 |
// NOTE: The test is theoratically valid for all browser, but only FF4 has this problem, |
| 151 |
// and document.activeElement is not be available on all browser |
| 152 |
var testUtil = org.eclipse.rwt.test.fixture.TestUtil; |
| 153 |
var combo = this._createDefaultCombo(); |
| 154 |
combo.setEditable( true ); |
| 155 |
assertTrue( combo.isFocusable() ); |
| 156 |
combo.focus(); |
| 157 |
testUtil.flush(); |
| 158 |
assertIdentical( combo._field._inputElement, document.activeElement ); |
| 159 |
testUtil.click( combo._button ); |
| 160 |
testUtil.flush(); |
| 161 |
assertIdentical( document.body, document.activeElement ); |
| 162 |
testUtil.click( combo._button ); |
| 163 |
testUtil.flush(); |
| 164 |
assertIdentical( combo._field._inputElement, document.activeElement ); |
| 165 |
combo.blur(); |
| 166 |
testUtil.flush(); |
| 167 |
assertIdentical( document.body, document.activeElement ); |
| 168 |
combo.destroy(); |
| 169 |
} |
| 170 |
}, |
| 171 |
|
| 147 |
testListPopUpBehavior : function() { |
172 |
testListPopUpBehavior : function() { |
| 148 |
var testUtil = org.eclipse.rwt.test.fixture.TestUtil; |
173 |
var testUtil = org.eclipse.rwt.test.fixture.TestUtil; |
| 149 |
var combo = this._createDefaultCombo(); |
174 |
var combo = this._createDefaultCombo(); |
|
Lines 158-164
Link Here
|
| 158 |
assertTrue( combo._list.isSeeable() ); |
183 |
assertTrue( combo._list.isSeeable() ); |
| 159 |
combo.destroy(); |
184 |
combo.destroy(); |
| 160 |
}, |
185 |
}, |
| 161 |
|
186 |
|
| 162 |
testListHeight : function() { |
187 |
testListHeight : function() { |
| 163 |
var testUtil = org.eclipse.rwt.test.fixture.TestUtil; |
188 |
var testUtil = org.eclipse.rwt.test.fixture.TestUtil; |
| 164 |
var combo = this._createDefaultCombo(); |
189 |
var combo = this._createDefaultCombo(); |
|
Lines 199-204
Link Here
|
| 199 |
_createDefaultCombo : function() { |
224 |
_createDefaultCombo : function() { |
| 200 |
var testUtil = org.eclipse.rwt.test.fixture.TestUtil; |
225 |
var testUtil = org.eclipse.rwt.test.fixture.TestUtil; |
| 201 |
var combo = new org.eclipse.swt.widgets.Combo(); |
226 |
var combo = new org.eclipse.swt.widgets.Combo(); |
|
|
227 |
combo.setTabIndex( 1 ); |
| 202 |
combo.setSpace( 239, 81, 6, 23 ); |
228 |
combo.setSpace( 239, 81, 6, 23 ); |
| 203 |
combo.setListItemHeight( 19 ); |
229 |
combo.setListItemHeight( 19 ); |
| 204 |
combo.setEditable( false ); |
230 |
combo.setEditable( false ); |