Bug 336225 Trim bars do not get unrendered by the rendering engine when trimmed window is unrendered
The trim bars are "ignored" by the rendering engine as it does not perform an unrendering pass on them when the parent trimmed window is being unrendered.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
assertNotNull("Rendered window should have a context",
				window.getContext());
		window.setToBeRendered(false);
		assertNull("No widget for an unrendered window", window.getWidget());
		assertNull("No context for an unrendered window", window.getContext());
	}
	public void testRemoveGui_Bug334577_01() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPerspectiveStack perspectiveStack = AdvancedFactoryImpl.eINSTANCE
				.createPerspectiveStack();
		window.getChildren().add(perspectiveStack);
		window.setSelectedElement(perspectiveStack);
		MPerspective perspective = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStack.getChildren().add(perspective);
		perspectiveStack.setSelectedElement(perspective);
		MWindow detachedWindow = BasicFactoryImpl.eINSTANCE.createWindow();
		perspective.getWindows().add(detachedWindow);
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		assertNotNull(detachedWindow.getContext());
		assertNotNull(detachedWindow.getWidget());
		perspective.setToBeRendered(false);
		assertNull(detachedWindow.getContext());