Search in sources :

Example 1 with WorkbenchBrowserSupport

use of org.eclipse.ui.internal.browser.WorkbenchBrowserSupport in project eclipse.platform.ui by eclipse-platform.

the class BrowserTests method testBrowserSupport.

@Test
public void testBrowserSupport() {
    WorkbenchBrowserSupport support = (WorkbenchBrowserSupport) WorkbenchBrowserSupport.getInstance();
    try {
        support.setDesiredBrowserSupportId(getExtensionId());
        assertFalse(support.hasNonDefaultBrowser());
        getBundle();
        support.setDesiredBrowserSupportId(getExtensionId());
        assertTrue(support.hasNonDefaultBrowser());
        removeBundle();
        support.setDesiredBrowserSupportId(getExtensionId());
        assertFalse(support.hasNonDefaultBrowser());
    } finally {
        support.setDesiredBrowserSupportId(null);
    }
}
Also used : WorkbenchBrowserSupport(org.eclipse.ui.internal.browser.WorkbenchBrowserSupport) Test(org.junit.Test)

Aggregations

WorkbenchBrowserSupport (org.eclipse.ui.internal.browser.WorkbenchBrowserSupport)1 Test (org.junit.Test)1