The test is slightly flaky because sometimes the console message doesn't get written out until the subsequent test runs, leading to two broken tests.
Created attachment 39234 [details] proposed patch Updated layout test to pause 10ms before shutting down the test to let unhandled worker exceptions get written to the console.
Comment on attachment 39234 [details] proposed patch r=me Try using a 0-delay timer - from IRC discussion, I believe it will achieve the desired goal here.
Committed as r48196 (with 0-msec timer)