Bug 326175 WBWRenderer arbitrarily modifies the window's parent's active context chain
The window's parent's context arbitrarily changes its active child to the window being rendered in createWidget(*).
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
assertTrue(
				"Changing the parent of a non-selected element should not change the value of the container's seletedElement",
				container.getSelectedElement() == partA);
		
		
		container.setSelectedElement(partA);
		container.getChildren().remove(partA);
		assertTrue(
				"Changing the parent of the selected element should have set the field to null",
				container.getSelectedElement() == null);
	}
	public void testCreateGuiBug301950() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		final MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		MPart part = BasicFactoryImpl.eINSTANCE.createPart();
		part.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		window.getChildren().add(part);
		IPresentationEngine renderer = (IPresentationEngine) appContext
				.get(IPresentationEngine.class.getName());
		renderer.createGui(part);
		renderer.removeGui(part);
		while (Display.getCurrent().readAndDispatch()) {
			
		}