Change tests that depended on the behaviour before bug 151407 was fixed, r=Ms2ger
authorSimon Montagu <smontagu@smontagu.org>
Tue, 23 Apr 2013 08:11:59 +0300
changeset 140503 b17e0eb827c0d866e31875c9823768b1866cf8cb
parent 140502 f3165dffa51cadd94d094486619226ff24f38959
child 140504 352ceffb0d9ebe96eb8d976789e45a4647a6b50f
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs151407
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Change tests that depended on the behaviour before bug 151407 was fixed, r=Ms2ger
dom/imptests/failures/html/html/dom/elements/global-attributes/test_document-dir.html.json
dom/tests/mochitest/bugs/test_bug42976.html
--- a/dom/imptests/failures/html/html/dom/elements/global-attributes/test_document-dir.html.json
+++ b/dom/imptests/failures/html/html/dom/elements/global-attributes/test_document-dir.html.json
@@ -1,4 +1,3 @@
 {
-  "Setting the idl attribute to a garbage value": true,
   "Setting the idl attribute to the empty sting": true
 }
--- a/dom/tests/mochitest/bugs/test_bug42976.html
+++ b/dom/tests/mochitest/bugs/test_bug42976.html
@@ -45,28 +45,37 @@ function runTest() {
     clonetrue.documentElement.firstChild.innerHTML="<div><dD></dD></div>";
     ok(doc.documentElement.innerHTML == clonetrue.documentElement.innerHTML,
        "innerHTML not preserved correctly; " + iframes[i].id);
   
   }
   
   // A couple of tests that don't quite fit in the framework.
   var doc = iframes[0].contentDocument;
+
+  // Setting document.dir does nothing in a document without an <html> element
   doc.dir="rtl";
   var docclone = doc.cloneNode(false);
   
   // doc.dir
-  ok(docclone.dir == "rtl", "dir not preserved correctly");
+  ok(docclone.dir == "", "dir set on doc without html element");
   
   // document.querySelectorAll(":lang(ja)")
   docclone.appendChild(docclone.createElement("html"));
   ok(docclone.querySelectorAll(":lang(ja)").length == 1, "lang not preserved correctly");
   
   docclone.documentElement.innerHTML="<body><p><a href='a.html' id=a>asf</a></body>";
   ok(docclone.getElementById('a').href == "http://www.mozilla.org/a.html",
      "base not preserved correctly");
 
+  // Now that we have an <html> element, deep cloning preserves document.dir
+  docclone.dir="rtl";
+  var cloneclone = docclone.cloneNode(true);
+
+  // doc.dir
+  ok(cloneclone.dir == "rtl", "dir not preserved correctly");
+
   SimpleTest.finish();
 }
 </script>
 </pre>
 </body>
 </html>