blob: 06f8f38ae830dabf4e36c3052f0720c03527fe63 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 IBM Corporation 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
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.ui.tests.dynamicplugins;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
/**
* @since 3.5
*/
public class DynamicInvalidContributionTest extends DynamicTestCase {
public DynamicInvalidContributionTest(String testName) {
super(testName);
}
public void testInvalidMenuContribution() throws Exception {
// open a window
IWorkbenchWindow window = openTestWindow();
// start up our bundle
getBundle();
// open another window, now that our invalid contribution is there, it
// should be parsed and loaded, this ensures the workbench window can
// still go up even if someone is contributing an invalid contribution
fWorkbench.openWorkbenchWindow(window.getActivePage().getPerspective().getId(), null);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.tests.dynamicplugins.DynamicTestCase#getExtensionId()
*/
protected String getExtensionId() {
return "menu.invalid.menu.contribution";
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.tests.dynamicplugins.DynamicTestCase#getExtensionPoint()
*/
protected String getExtensionPoint() {
return IWorkbenchRegistryConstants.PL_MENUS;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.tests.dynamicplugins.DynamicTestCase#getInstallLocation()
*/
protected String getInstallLocation() {
return "data/org.eclipse.newInvalidMenuContribution1";
}
}