Bug 803730 - Mochitest for bug.
authorKannan Vijayan <kvijayan@mozilla.com>
Thu, 15 Nov 2012 22:57:18 -0500
changeset 113474 2c17533a4c275d303bae48f6659623ae4983cf58
parent 113473 1319ef8226c0456be0fbc43c1a72353d79f779f6
child 113475 22f24157e6ea1a2012e6ef0178775e5ce92117c2
push id18168
push userkvijayan@mozilla.com
push dateFri, 16 Nov 2012 03:57:23 +0000
treeherdermozilla-inbound@2c17533a4c27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs803730
milestone19.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
Bug 803730 - Mochitest for bug.
js/xpconnect/tests/mochitest/Makefile.in
js/xpconnect/tests/mochitest/test_bug803730.html
--- a/js/xpconnect/tests/mochitest/Makefile.in
+++ b/js/xpconnect/tests/mochitest/Makefile.in
@@ -82,16 +82,17 @@ MOCHITEST_FILES =	chrome_wrappers_helper
 		test_bug789713.html \
 		test_bug793969.html \
 		file_bug795275.html \
 		file_bug795275.xml \
 		file_bug799348.html \
 		test_bug800864.html \
 		test_bug802557.html \
 		file_bug802557.html \
+		test_bug803730.html \
 		test_bug809547.html \
 		$(NULL)
 
 ifneq ($(OS_TARGET),Android)
 ifndef MOZ_PLATFORM_MAEMO
 MOCHITEST_FILES +=	test_bug564330.html \
 		test_bug618017.html
 endif
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/mochitest/test_bug803730.html
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=803730
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 803730</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=803730">Mozilla Bug 803730</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 803730 **/
+var foo = {
+  isNode: function(obj) {
+    return !!(obj instanceof Node);
+  }
+};
+
+var elem = document.createElement("span");
+var trueCount = 0,
+    falseCount = 0;
+for (var x = 0; x < 100000; x++) {
+  if (foo.isNode(elem))
+    trueCount++;
+  else
+    falseCount++;
+}
+is(falseCount, 0, "elem instanceof Node working correctly.");
+
+</script>
+</pre>
+</body>
+</html>