I found a very weird behavior of the SWT `Browser` widget:

```
@Test
public void test() throws Exception {
    Shell shell = new Shell();
    Browser browser = new Browser(shell, SWT.NONE);
    browser.setText("Hello World!");
    shell.open();

    Assert.assertEquals("Hello World!", browser.getText());
}

```

This test **fails**, because `Browser#getText()` returns an empty string.

[An other question](https://stackoverflow.com/questions/14085393/html-code-getter-using-swt-browser) suggest it might be because the `Browser` is still loading the page, but using `setText` doesn't trigger loading (because the HTML is already there), and the `ProgressListener` never gets called, either.

The JavaDoc says: *Returns a string with HTML that represents the content of the current page.* Nothing about returning an empty string for some reason.

How do I get the text of a browser? (I need it for a test case like the above, so "waiting" for the `Browser` widget is out of the question. I'm not sure that would work either way.)