Bug 329184 Detached view that is an activation target candidate can prevent perspective switching
1. Detach the 'Outline' view. 2. Window > Open Perspective > Debug 3. Window > Open Perspective > Java 4. The perspective switch doesn't actually happen. You see the 'Debug' perspective's content with an 'Outline' view detached. Closing the 'Outline' view in the 'Debug' perspective will workaround this problem.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
assertFalse(partService.isPartVisible(partFrontB));
		assertTrue(partService.isPartVisible(partBackB));
	}
	/**
	 * Test to ensure that calling bringToTop(MPart) will change the active part
	 * if the active part is obscured by the part that's being brought to top.
	 * The part that is being passed to bringToTop(MPart) is a part that's being
	 * represented by a placeholder in this case.
	 */
	public void testBringToTop_ActivationChanges02() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPart partB = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partB);
		MPerspectiveStack perspectiveStack = AdvancedFactoryImpl.eINSTANCE
				.createPerspectiveStack();
		window.getChildren().add(perspectiveStack);
		window.setSelectedElement(perspectiveStack);
		MPerspective perspective = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStack.getChildren().add(perspective);
		perspectiveStack.setSelectedElement(perspective);
		MPartStack partStack = BasicFactoryImpl.eINSTANCE.createPartStack();
		perspective.getChildren().add(partStack);
		perspective.setSelectedElement(partStack);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partA);