Backing out e79947cb55bc to fix test failures a=me (CLOSED TREE)
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 23 Apr 2010 17:17:10 +1200
changeset 41194 92bf83a7f317bdb578bcfe2cedf86829259a38d8
parent 41192 1cab05410c6c3c1bfa3bd22bfa916ac8f4942550 (current diff)
parent 41193 5340a5991b5a85f598ea2fb79356f6f6daab31e7 (diff)
child 41195 fe937d72a9cea4ca9d1cf85230989dc109d6bc36
push idunknown
push userunknown
push dateunknown
reviewersme
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Backing out e79947cb55bc to fix test failures a=me (CLOSED TREE)
content/base/test/test_bug346485.html
content/html/content/test/test_bug346485.html
layout/reftests/forms/output/output-1.html
layout/reftests/forms/output/output-2.html
layout/reftests/forms/output/output-3.html
layout/reftests/forms/output/output-4.html
layout/reftests/forms/output/output-5.html
layout/reftests/forms/output/output-6.html
layout/reftests/forms/output/output-7.html
layout/reftests/forms/output/output-ref-2.html
layout/reftests/forms/output/output-ref-3.html
layout/reftests/forms/output/output-ref.html
layout/reftests/forms/output/reftest.list
--- a/content/base/test/Makefile.in
+++ b/content/base/test/Makefile.in
@@ -368,17 +368,16 @@ include $(topsrcdir)/config/rules.mk
 		test_bug553896.xhtml \
 		test_bug541937.html \
 		file_bug541937.html \
 		file_bug541937.xhtml \
 		test_bug558726.html \
 		test_bug557892.html \
 		file_bug557892.html \
 		test_bug559526.html \
-		test_bug346485.html \
 		$(NULL)
 
 # This test fails on the Mac for some reason
 ifneq (,$(filter gtk2 windows,$(MOZ_WIDGET_TOOLKIT)))
 _TEST_FILES += 	test_copyimage.html \
 		$(NULL)
 endif
 
deleted file mode 100644
--- a/content/base/test/test_bug346485.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=346485
--->
-<head>
-  <title>Test for Bug 346485</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <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=346485">Mozilla Bug 346485</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  <input id='a'>
-  <input id='b'>
-  <output id='o' for='a b'></output>
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 346485 **/
-
-/**
- * This test is testing DOMSettableTokenList used by the output element.
- */
-
-var o = document.getElementById('o');
-
-is(o.htmlFor, 'a b',
-  "htmlFor IDL attribute should reflect for content attribute");
-
-is(o.htmlFor.value, 'a b',
-  "value should return the underlying string");
-
-is(o.htmlFor.length, 2, "Size should be '2'");
-
-ok(o.htmlFor.contains('a'), "It should contain 'a' token'");
-ok(!o.htmlFor.contains('c'), "It should not contain 'c' token");
-
-is(o.htmlFor.item(0), 'a', "First item is 'a' token'");
-is(o.htmlFor.item(42), null, "Out-of-range should return null");
-
-o.htmlFor.add('c');
-is(o.htmlFor, 'a b c', "'c' token should have been added");
-is(o.htmlFor.length, 3, "Size should be '3'");
-
-o.htmlFor.add('a');
-is(o.htmlFor, 'a b c', "Nothing should have changed");
-is(o.htmlFor.length, 3, "Size should be '3'");
-
-o.htmlFor.remove('a');
-is(o.htmlFor, 'b c', "'a' token should have been removed");
-is(o.htmlFor.length, 2, "Size should be '2'");
-
-o.htmlFor.remove('d');
-is(o.htmlFor, 'b c', "Nothing should have been removed");
-is(o.htmlFor.length, 2, "Size should be '2'");
-
-o.htmlFor.toggle('a');
-is(o.htmlFor, 'b c a', "'a' token should have been added");
-is(o.htmlFor.length, 3, "Size should be '3'");
-
-o.htmlFor.toggle('b');
-is(o.htmlFor, 'c a', "Nothing should have changed");
-is(o.htmlFor.length, 2, "Size should be '2'");
-
-o.htmlFor.value = "foo bar";
-is(o.htmlFor, 'foo bar', "The underlying string should have changed");
-is(o.htmlFor.length, 2, "Size should be '2'");
-ok(o.htmlFor.contains('foo'), "It should contain 'foo'");
-
-</script>
-</pre>
-</body>
-</html>
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -153,13 +153,12 @@ include $(topsrcdir)/config/rules.mk
 		test_bug529819.html \
 		test_bug529859.html \
 		test_bug535043.html \
 		test_bug547850.html \
 		test_bug457800.html \
 		test_bug536891.html \
 		test_bug536895.html \
 		test_bug458037.xhtml \
-		test_bug346485.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
deleted file mode 100644
--- a/content/html/content/test/test_bug346485.html
+++ /dev/null
@@ -1,179 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=346485
--->
-<head>
-  <title>Test for Bug 346485</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <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=346485">Mozilla Bug 346485</a>
-<p id="display"></p>
-<iframe name="submit_frame" onload="checkFormSubmission();" style="visibility: hidden;"></iframe>
-<div id="content" style="display: none">
-  <form id='f' method='get' target='submit_frame' action='foo'>
-    <input name='a' id='a'>
-    <input name='b' id='b'>
-    <output id='o' for='a b' name='output-name'>tulip</output>
-  </form>
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 346485 **/
-
-function checkNameAttribute(element)
-{
-  function nameAttributeEquals(element, expectedValue)
-  {
-    is(element.name, expectedValue, "Output name IDL attribute is not correct");
-    is(element.getAttribute('name'), expectedValue,
-      "Output name content attribute is not correct");
-  }
-
-  nameAttributeEquals(element, "output-name");
-
-  element.name = "new-name";
-  nameAttributeEquals(element, "new-name");
-
-  element.setAttribute('name', 'new-name-2');
-  nameAttributeEquals(element, "new-name-2");
-}
-
-function checkValueAndDefaultValueIDLAttribute(element)
-{
-  is(element.value, element.textContent,
-    "The value IDL attribute should act like the textContent IDL attribute");
-
-  element.value = "foo";
-  is(element.value, "foo", "Value should be 'foo'");
-
-  is(element.defaultValue, "", "Default defaultValue is ''");
-
-  element.defaultValue = "bar";
-  is(element.defaultValue, "bar", "defaultValue should be 'bar'");
-
-  // More complex situation.
-  element.textContent = 'foo';
-  var b = document.createElement('b');
-  b.textContent = 'bar'
-  element.appendChild(b);
-  is(element.value, element.textContent,
-    "The value IDL attribute should act like the textContent IDL attribute");
-}
-
-function checkValueModeFlag(element)
-{
-  /**
-   * The value mode flag is the flag used to know if value should represent the
-   * textContent or the default value.
-   */
-  // value mode flag should be 'value'
-  isnot(element.defaultValue, element.value,
-    "When value is set, defaultValue keeps its value");
-
-  var f = document.getElementById('f');
-  f.reset();
-  // value mode flag should be 'default'
-  is(element.defaultValue, element.value, "When reset, defaultValue=value");
-  is(element.textContent, element.defaultValue,
-    "textContent should contain the defaultValue");
-}
-
-function checkDescendantChanged(element)
-{
-  /**
-   * Whenever a descendant is changed if the value mode flag is value,
-   * the default value should be the textContent value.
-   */
-  element.defaultValue = 'tulip';
-  element.value = 'foo';
-
-  // set value mode flag to 'default'
-  var f = document.getElementById('f');
-  f.reset();
-
-  is(element.textContent, element.defaultValue,
-    "textContent should contain the defaultValue");
-  element.textContent = "bar";
-  is(element.textContent, element.defaultValue,
-    "textContent should contain the defaultValue");
-}
-
-function checkFormIDLAttribute(element)
-{
-  is(element.form, document.getElementById('f'),
-    "form IDL attribute is invalid");
-}
-
-function checkHtmlForIDLAttribute(element)
-{
-  is(element.htmlFor, 'a b',
-    "htmlFor IDL attribute should reflect the for content attribute");
-
-  // DOMSettableTokenList is tested in another bug so we just test assignation
-  element.htmlFor.value = 'a b c';
-  is(element.htmlFor, 'a b c', "htmlFor shoud have changed");
-}
-
-function submitForm()
-{
-  // Setting the values for the submit.
-  document.getElementById('o').value = 'foo';
-  document.getElementById('a').value = 'afield';
-  document.getElementById('b').value = 'bfield';
-
-  // This will call checkFormSubmission() which is going to call ST.finish().
-  document.getElementById('f').submit();
-}
-
-function checkFormSubmission()
-{
-  /**
-   * All elements values have been set just before the submission.
-   * The input elements values should be in the submit url but the ouput
-   * element value should not appear.
-   */
-
-  is(frames['submit_frame'].location.href,
-    'http://mochi.test:8888/tests/content/html/content/test/foo?a=afield&b=bfield',
-     "The output element value should not be submitted");
-  SimpleTest.finish();
-}
-
-SimpleTest.waitForExplicitFinish();
-
-var o = document.getElementsByTagName('output');
-is(o.length, 1, "There should be one output element");
-
-o = o[0];
-ok(o instanceof HTMLOutputElement,
-  "The output should be instance of HTMLOutputElement");
-
-o = document.getElementById('o');
-ok(o instanceof HTMLOutputElement,
-  "The output should be instance of HTMLOutputElement");
-
-is(o.type, "output", "Output type IDL attribute should be 'output'");
-
-checkNameAttribute(o);
-
-checkValueAndDefaultValueIDLAttribute(o);
-
-checkValueModeFlag(o);
-
-checkDescendantChanged(o);
-
-checkFormIDLAttribute(o);
-
-checkHtmlForIDLAttribute(o);
-
-submitForm();
-
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-1.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <!-- Test: the output shouldn't show anything when there is no content -->
-  <body>
-    <output></output>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-2.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <!-- Test: the output should show the textContent -->
-  <body>
-    <output>foo</output>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-3.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <!-- Test: the output should show its content -->
-  <body>
-    <output>foo<b>bar</b></output>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-4.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <!-- Test: the output should show its content -->
-  <body>
-    <output>foo<input></output>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-5.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html class="reftest-wait">
-  <!-- Test: the output element should show its default value -->
-  <script type="text/javascript">
-    function setDefaultValue()
-    {
-      document.getElementById('o').defaultValue = "foo";
-    }
-    function disableReftestWait()
-    {
-      document.documentElement.className = '';
-    }
-  </script>
-
-  <body onload="setDefaultValue(); disableReftestWait();">
-    <output id="o"></output>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-6.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html class="reftest-wait">
-  <!-- Test: the output element should show its value -->
-  <script type="text/javascript">
-    function setValue()
-    {
-      document.getElementById('o').value = "foo";
-    }
-    function disableReftestWait()
-    {
-      document.documentElement.className = '';
-    }
-  </script>
-
-  <body onload="setValue(); disableReftestWait();">
-    <output id="o"></output>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-7.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html class="reftest-wait">
-  <!-- Test: the output element should show its value -->
-  <script type="text/javascript">
-    function setDefaultValue()
-    {
-      document.getElementById('o').value = "bar";
-    }
-    function setValue()
-    {
-      document.getElementById('o').value = "foo";
-    }
-    function disableReftestWait()
-    {
-      document.documentElement.className = '';
-    }
-  </script>
-
-  <body onload="setDefaultValue(); setValue(); disableReftestWait();">
-    <output id="o"></output>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-ref-2.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <body>
-    foo<b>bar</b>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-ref-3.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <body>
-    foo<input>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/output-ref.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <body>
-    foo
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/output/reftest.list
+++ /dev/null
@@ -1,7 +0,0 @@
-== output-1.html about:blank
-== output-2.html output-ref.html
-== output-3.html output-ref-2.html
-== output-4.html output-ref-3.html
-== output-5.html output-ref.html
-== output-6.html output-ref.html
-== output-7.html output-ref.html
--- a/layout/reftests/forms/reftest.list
+++ b/layout/reftests/forms/reftest.list
@@ -38,11 +38,8 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") !=
 != radio-checked-notref.html about:blank
 != checkbox-checked-native.html about:blank
 != checkbox-checked-native-notref.html about:blank
 != radio-checked-native.html about:blank
 != radio-checked-native-notref.html about:blank
 
 # placeholder
 include placeholder/reftest.list
-
-# output element
-include output/reftest.list