Bug 327980 Part activation history should not be perspective-dependent
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
perspective.setSelectedElement(stackA);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		stackA.getChildren().add(partA);
		stackA.setSelectedElement(partA);
		MPlaceholder areaPlaceholder = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		areaPlaceholder.setRef(area);
		area.setCurSharedRef(areaPlaceholder);
		perspective.getChildren().add(areaPlaceholder);
		MPartStack stackB = BasicFactoryImpl.eINSTANCE.createPartStack();
		area.getChildren().add(stackB);
		area.setSelectedElement(stackB);
		MPart partB1 = BasicFactoryImpl.eINSTANCE.createPart();
		stackB.getChildren().add(partB1);
		stackB.setSelectedElement(partB1);
		MPlaceholder placeholderPartB2 = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderPartB2.setRef(partB2);
		partB2.setCurSharedRef(placeholderPartB2);
		stackB.getChildren().add(placeholderPartB2);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partB1);
		partService.activate(partB2);
		partService.hidePart(partB2);
		assertEquals(partB1, stackB.getSelectedElement());
		assertEquals(partB1, partService.getActivePart());
		partService.hidePart(partB1);
		assertNull(stackB.getSelectedElement());