4 https://bugzilla.mozilla.org/show_bug.cgi?id=742156
8 <title>Test for Bug
742156</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=742156">Mozilla Bug
742156</a>
15 <div id=
"content" style=
"display: none">
19 <script type=
"application/javascript">
21 /** Test for Bug
742156 **/
23 var nativeToString = (
"" + String).replace(
"String",
"EventTarget");
25 var eventTargetToString =
"" + EventTarget;
26 is(eventTargetToString, nativeToString,
27 "Stringifying a DOM interface object should return the same string" +
28 "as stringifying a native function.");
30 ok(false,
"Stringifying a DOM interface object shouldn't throw.");
34 eventTargetToString = Function.prototype.toString.call(EventTarget);
35 is(eventTargetToString, nativeToString,
36 "Stringifying a DOM interface object via Function.prototype.toString " +
37 "should return the same string as stringifying a native function.");
39 ok(false,
"Stringifying a DOM interface object shouldn't throw.");