01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.tests.performance;
11:
12: import org.eclipse.test.performance.Dimension;
13: import org.eclipse.ui.IWorkbenchWindow;
14:
15: /**
16: * @since 3.1
17: */
18: public class OpenCloseWindowTest extends BasicPerformanceTest {
19:
20: private String id;
21:
22: /**
23: * @param tagging
24: * @param testName
25: */
26: public OpenCloseWindowTest(String id, int tagging) {
27: super ("testOpenCloseWindows:" + id, tagging);
28: this .id = id;
29: }
30:
31: protected void runTest() throws Throwable {
32:
33: tagIfNecessary("UI - Open/Close Window",
34: Dimension.ELAPSED_PROCESS);
35:
36: setDegradationComment("<a href=https://bugs.eclipse.org/bugs/show_bug.cgi?id=179725>See Bug 179725</a> ");
37:
38: exercise(new TestRunnable() {
39: public void run() throws Exception {
40: processEvents();
41: EditorTestHelper.calmDown(500, 30000, 500);
42:
43: startMeasuring();
44: IWorkbenchWindow window = openTestWindow(id);
45: processEvents();
46: window.close();
47: processEvents();
48: stopMeasuring();
49: }
50: });
51:
52: commitMeasurements();
53: assertPerformance();
54: }
55: }
|