1 description("Test serialization of event handlers for bug 25544.");
3 function normalizedFunctionString(string
)
5 // Remove the white space before/after { } which differs between browsers
6 string
= string
.replace(/\{\s+/g, "{");
7 string
= string
.replace(/\s+\}/g, "}");
11 var div
= document
.createElement("div");
12 div
.setAttribute("onclick", "test();");
13 shouldBeEqualToString("normalizedFunctionString(div.onclick.toString())", "function onclick(event) {test();}");
15 var path
= document
.createElementNS("http://www.w3.org/2000/svg", "path");
16 path
.setAttribute("onclick", "test();");
17 shouldBeEqualToString("normalizedFunctionString(path.onclick.toString())", "function onclick(evt) {test();}");