diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 33f9c0d23f06..f4d3acdfa1bf 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -377,7 +377,8 @@ nsXULElement::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const } NS_ENSURE_SUCCESS(rv, rv); element->AddListenerFor(*originalName, true); - if (originalName->Equals(nsGkAtoms::id)) { + if (originalName->Equals(nsGkAtoms::id) && + !originalValue->IsEmptyString()) { element->SetHasID(); } if (originalName->Equals(nsGkAtoms::_class)) { diff --git a/content/xul/content/test/Makefile.in b/content/xul/content/test/Makefile.in index 747266ef33a6..70e97224b9f5 100644 --- a/content/xul/content/test/Makefile.in +++ b/content/xul/content/test/Makefile.in @@ -20,6 +20,7 @@ MOCHITEST_CHROME_FILES = \ test_bug233643.xul \ test_bug398289.html \ 398289-resource.xul \ + test_bug775972.xul \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/content/xul/content/test/test_bug775972.xul b/content/xul/content/test/test_bug775972.xul new file mode 100644 index 000000000000..eeb7ebdac3db --- /dev/null +++ b/content/xul/content/test/test_bug775972.xul @@ -0,0 +1,35 @@ + + + + + + + + + + Mozilla Bug 775972 + + + + + + diff --git a/testing/marionette/client/marionette/tests/unit/unit-tests.ini b/testing/marionette/client/marionette/tests/unit/unit-tests.ini index de2de526b1c9..91afb47714d2 100644 --- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini +++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini @@ -14,6 +14,8 @@ b2g = false [test_log.py] [test_emulator.py] browser = false +qemu = true + [test_execute_async_script.py] [test_execute_script.py] [test_simpletest_fail.js]