Testcase for #8976

Test case for #8976, an async load issue with Firefox even though the loading should be synchronous. Click the button then check console log for output of test. If "count = 1, worked" shows up instead of an error, then the test is successful.