PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/tsjepublisher/static/qooxdoo/framework/source/class/qx/test/ui/form/AbstractSelectBox.js

http://hackathon.codeplex.com
JavaScript | 66 lines | 38 code | 10 blank | 18 comment | 0 complexity | 5c0d564965b2857f7a1ac3f4bee0171a MD5 | raw file
Possible License(s): CC-BY-SA-3.0, LGPL-3.0, LGPL-2.1
  1. /* ************************************************************************
  2. qooxdoo - the new era of web development
  3. http://qooxdoo.org
  4. Copyright:
  5. 2004-2008 1&1 Internet AG, Germany, http://www.1und1.de
  6. License:
  7. LGPL: http://www.gnu.org/licenses/lgpl.html
  8. EPL: http://www.eclipse.org/org/documents/epl-v10.php
  9. See the LICENSE file in the project's top-level directory for details.
  10. Authors:
  11. * Alexander Steitz (aback)
  12. ************************************************************************ */
  13. qx.Class.define("qx.test.ui.form.AbstractSelectBox",
  14. {
  15. extend : qx.test.ui.LayoutTestCase,
  16. members :
  17. {
  18. setUp : function()
  19. {
  20. this.__selectBox = new qx.ui.form.SelectBox;
  21. this.getRoot().add(this.__selectBox);
  22. this.__comboBox = new qx.ui.form.ComboBox;
  23. this.getRoot().add(this.__comboBox);
  24. this.flush();
  25. },
  26. tearDown : function()
  27. {
  28. this.base(arguments);
  29. this.__selectBox.dispose();
  30. this.__selectBox = null;
  31. this.__comboBox.dispose();
  32. this.__comboBox = null;
  33. },
  34. testStatePopupOpen : function()
  35. {
  36. this.__selectBox.open();
  37. this.flush();
  38. this.assertTrue(this.__selectBox.hasState("popupOpen"));
  39. this.__selectBox.close();
  40. this.flush();
  41. this.assertFalse(this.__selectBox.hasState("popupOpen"));
  42. this.__comboBox.open();
  43. this.flush();
  44. this.assertTrue(this.__comboBox.hasState("popupOpen"));
  45. this.__comboBox.close();
  46. this.flush();
  47. this.assertFalse(this.__comboBox.hasState("popupOpen"));
  48. }
  49. }
  50. });