瀏覽代碼

Fix input text frame test under xvfb

Fixes issue 3650

Change-Id: I52888b28bb2429f7a192cf49f00dd2abc8399886
Reviewed-on: http://gerrit.dmdirc.com/675
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.6.3
Chris Smith 14 年之前
父節點
當前提交
27dc3e21ae
共有 1 個文件被更改,包括 9 次插入11 次删除
  1. 9
    11
      test/com/dmdirc/addons/ui_swing/components/frames/InputTextFrameTest.java

+ 9
- 11
test/com/dmdirc/addons/ui_swing/components/frames/InputTextFrameTest.java 查看文件

70
         controller.onLoad();
70
         controller.onLoad();
71
 
71
 
72
         Main.ensureExists(PluginManager.getPluginManager(), "tabcompletion");
72
         Main.ensureExists(PluginManager.getPluginManager(), "tabcompletion");
73
+
74
+        UIUtilities.initUISettings();
75
+
76
+        mainframe = new FrameFixture(controller.getMainWindow());
73
     }
77
     }
74
 
78
 
75
     @Before
79
     @Before
77
         cmmap = new TestConfigManagerMap();
81
         cmmap = new TestConfigManagerMap();
78
         cmmap.settings.put("ui.pasteProtectionLimit", "1");
82
         cmmap.settings.put("ui.pasteProtectionLimit", "1");
79
 
83
 
80
-        if (window == null) {
81
-            owner = new TestWritableFrameContainer(512, cmmap);
82
-
83
-            setupWindow(cmmap);
84
-        }
84
+        owner = new TestWritableFrameContainer(512, cmmap);
85
+        setupWindow(cmmap);
85
     }
86
     }
86
 
87
 
87
     @After
88
     @After
88
     public void tearDown() {
89
     public void tearDown() {
89
-        // ??
90
+        window.close();
91
+        owner.window.close();
92
+        WindowManager.removeWindow(owner.window);
90
     }
93
     }
91
 
94
 
92
     @Test
95
     @Test
146
     }
149
     }
147
 
150
 
148
     protected void setupWindow(final ConfigManager configManager) {
151
     protected void setupWindow(final ConfigManager configManager) {
149
-        UIUtilities.initUISettings();
150
-
151
-        mainframe = new FrameFixture(controller.getMainWindow());
152
-
153
         final CustomInputFrame titf = new CustomInputFrame(owner,
152
         final CustomInputFrame titf = new CustomInputFrame(owner,
154
                 GlobalCommandParser.getGlobalCommandParser(), controller);
153
                 GlobalCommandParser.getGlobalCommandParser(), controller);
155
 
154
 
162
         titf.open();
161
         titf.open();
163
 
162
 
164
         window = new JInternalFrameFixture(mainframe.robot, titf);
163
         window = new JInternalFrameFixture(mainframe.robot, titf);
165
-        window.robot.settings().eventPostingDelay(250);
166
     }
164
     }
167
 
165
 
168
 }
166
 }

Loading…
取消
儲存