public void testPopupDoNotAnnoyUsers() {
final MockAutocompleterEnvironment helper = new MockAutocompleterEnvironment();
helper.setup(new PathUtil("foo.html"),
"<html>\n <body>\n <script>\n\n </script>\n </body>\n</html>", 3, 0, true);
ExplicitActionType action = helper.autocompleter.htmlAutocompleter.getExplicitAction(
helper.editor.getSelection(), new SignalEventEssence(' '), false).getType();
assertTrue("no popup before mode is determined", action == ExplicitActionType.DEFAULT);
helper.parser.getListenerRegistrar().add(new DocumentParserListenerAdapter(
helper.autocompleter, helper.editor));