Backed out changeset c8479bdaf0c8 (bug 839171) for mochitest-browser-chrome failures on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 13 Feb 2013 12:32:00 -0500
changeset 131634 b87f9a587e86347399c90c78b9d7d05d0ef1e0f5
parent 131633 dcc017a7cd4d7f9659f6b16c68b6a5e36e61238e
child 131635 700ef0823d91b3e8163bc7d7496cb01bc97bbd84
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs839171
milestone21.0a1
backs outc8479bdaf0c869029948e78eb78517ed84cf0a57
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
Backed out changeset c8479bdaf0c8 (bug 839171) for mochitest-browser-chrome failures on a CLOSED TREE.
content/html/content/src/HTMLButtonElement.cpp
content/html/content/test/Makefile.in
content/html/content/test/forms/test_button_attributes_reflection.html
content/html/content/test/test_bug585508.html
--- a/content/html/content/src/HTMLButtonElement.cpp
+++ b/content/html/content/src/HTMLButtonElement.cpp
@@ -114,20 +114,20 @@ NS_IMETHODIMP
 HTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm)
 {
   return nsGenericHTMLFormElement::GetForm(aForm);
 }
 
 NS_IMPL_BOOL_ATTR(HTMLButtonElement, Autofocus, autofocus)
 NS_IMPL_BOOL_ATTR(HTMLButtonElement, Disabled, disabled)
 NS_IMPL_ACTION_ATTR(HTMLButtonElement, FormAction, formaction)
-NS_IMPL_ENUM_ATTR_DEFAULT_MISSING_INVALID_VALUES(HTMLButtonElement, FormEnctype, formenctype,
-                                                 "", kFormDefaultEnctype->tag)
-NS_IMPL_ENUM_ATTR_DEFAULT_MISSING_INVALID_VALUES(HTMLButtonElement, FormMethod, formmethod,
-                                                 "", kFormDefaultMethod->tag)
+NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(HTMLButtonElement, FormEnctype, formenctype,
+                                kFormDefaultEnctype->tag)
+NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(HTMLButtonElement, FormMethod, formmethod,
+                                kFormDefaultMethod->tag)
 NS_IMPL_BOOL_ATTR(HTMLButtonElement, FormNoValidate, formnovalidate)
 NS_IMPL_STRING_ATTR(HTMLButtonElement, FormTarget, formtarget)
 NS_IMPL_STRING_ATTR(HTMLButtonElement, Name, name)
 NS_IMPL_STRING_ATTR(HTMLButtonElement, Value, value)
 NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(HTMLButtonElement, Type, type,
                                 kButtonDefaultType->tag)
 
 int32_t
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -154,16 +154,17 @@ MOCHITEST_FILES = \
 		test_bug564001.html \
 		test_bug566046.html \
 		test_bug567938-1.html \
 		test_bug567938-2.html \
 		test_bug567938-3.html \
 		test_bug567938-4.html \
 		test_bug569955.html \
 		test_bug573969.html \
+		test_bug585508.html \
 		test_bug561640.html \
 		test_bug566064.html \
 		test_bug582412-1.html \
 		test_bug582412-2.html \
 		test_bug558788-1.html \
 		test_bug558788-2.html \
 		test_bug561634.html \
 		test_bug590353-1.html \
--- a/content/html/content/test/forms/test_button_attributes_reflection.html
+++ b/content/html/content/test/forms/test_button_attributes_reflection.html
@@ -35,33 +35,37 @@ reflectLimitedEnumerated({
   element: document.createElement("button"),
   attribute: "formEnctype",
   validValues: [
     "application/x-www-form-urlencoded",
     "multipart/form-data",
     "text/plain",
   ],
   invalidValues: [ "text/html", "", "tulip" ],
-  defaultValue: {
-    invalid: "application/x-www-form-urlencoded",
-    missing: "",
-  }
+// TODO (Bug 839171):
+//  defaultValue: {
+//    invalid: "application/x-www-form-urlencoded",
+//    missing: "",
+//  }
+  defaultValue: "application/x-www-form-urlencoded",
 });
 
 // .formMethod
 reflectLimitedEnumerated({
   element: document.createElement("button"),
   attribute: "formMethod",
   validValues: [ "get", "post" ],
   invalidValues: [ "put", "", "tulip" ],
   unsupportedValues: [ "dialog" ],
-  defaultValue: {
-    invalid: "get",
-    missing: "",
-  }
+// TODO (Bug 839171):
+//  defaultValue: {
+//    invalid: "get",
+//    missing: "",
+//  }
+  defaultValue: "get",
 });
 
 // .formNoValidate
 reflectBoolean({
   element: document.createElement("button"),
   attribute: "formNoValidate",
 });
 
new file mode 100644
--- /dev/null
+++ b/content/html/content/test/test_bug585508.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=585508
+-->
+<head>
+  <title>Test for Bug 585508</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=585508">Mozilla Bug 585508</a>
+<p id="display"></p>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 585508 **/
+
+var enctypeTestData = [
+  // Default value.
+  [ "application/x-www-form-urlencoded" ],
+  // Valid values.
+  [ "application/x-www-form-urlencoded", "multipart/form-data", "text/plain" ],
+  // Invalid values.
+  [ "", " ", "foo", "multipart/foo" ]
+];
+
+var methodTestData = [
+  // Default value.
+  [ "get" ],
+  // Valid values.
+  [ "get", "post" ],
+  // Invalid values.
+  [ "", " ", "foo" ],
+];
+
+function checkAttribute(form, attrName, idlName, data)
+{
+  is(form.getAttribute(attrName), null,
+     "By default " + attrName + " content attribute should be null");
+  is(form[idlName], data[0][0],
+     "By default " + idlName + " IDL attribute should be equal to " +
+     data[0][0]);
+
+  // Valid values.
+  for (i in data[1]) {
+    form.setAttribute(attrName, data[1][i]);
+    is(form.getAttribute(attrName), data[1][i],
+       "getAttribute should return the content attribute");
+    is(form[idlName], data[1][i], "When getting, " + idlName + " IDL attribute " +
+       "should be equal to the content attribute if the value is known");
+  }
+
+  // Invalid values.
+  for (i in data[2]) {
+    form.setAttribute(attrName, data[2][i]);
+    is(form.getAttribute(attrName), data[2][i],
+       "getAttribute should return the content attribute");
+    is(form[idlName], data[0][0], "When getting, " + idlName + " IDL attribute " +
+       "should return the default value if the content attribute value isn't known");
+  }
+}
+
+var button = document.createElement('button');
+
+checkAttribute(button, 'formenctype', 'formEnctype', enctypeTestData);
+checkAttribute(button, 'formmethod', 'formMethod', methodTestData);
+
+</script>
+</pre>
+</body>
+</html>