Bug 1354641 - part 2: fix reftest 672709-ref.html intermittent failure. r=ehsan
Avoid put <script> in body element, because the spell checker will go
through all text elements in <body>. In this case, the whole document is in
designMode, so every word in <body> will be checked. SpellCheker takes longer
time to comsume all words than before, therefore the test might be timeout.
MozReview-Commit-ID: ZsQrqmqy6H
--- a/editor/reftests/672709-ref.html
+++ b/editor/reftests/672709-ref.html
@@ -1,22 +1,24 @@
<!DOCTYPE html>
<html class="reftest-wait">
- <body>
- <style>
- :-moz-read-only { color: red; }
- :-moz-read-write { color: green; }
- </style>
+ <head>
<script>
onload = function() {
document.designMode = "on";
var p = document.createElement("p");
p.textContent = "test";
document.getElementById("x").appendChild(p);
getSelection().removeAllRanges(); // don't need a caret
document.documentElement.removeAttribute("class");
};
</script>
+ </head>
+ <body>
+ <style>
+ :-moz-read-only { color: red; }
+ :-moz-read-write { color: green; }
+ </style>
<div contenteditable id="x">
</div>
more test
</body>
</html>