The fast/encoding/script-in-head.html test has a race condition: the page may be dumped before the dynamically generated <script> tag is executed. Likewise, the document.write() may be buffered, leading to unreliable results. (Buffering document.write() may be a bug itself, but since it's not related to what this is testing, we should work around it here if we can.)
Created attachment 24266 [details] Fixes test Expected results are unchanged.
Comment on attachment 24266 [details] Fixes test r=me
I'll land this.
Fixed in r37547.