blob: fcb8d845da5255285d75f4266038a2b1b3ea5ddd [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that toString() works correctly on NPObject.");
plugin = document.createElement("embed");
plugin.type = "application/x-webkit-test-netscape";
plugin.setAttribute('test', 'to-string-and-value-of-object');
document.body.appendChild(plugin);
shouldBeEqualToString("plugin.toString()", "TestObject");
// Normal plugin.testObject + "" will call valueOf,
// do some tricks to make a call to implicit toString.
shouldBeEqualToString("[plugin, ''].join('')", "TestObject");
var successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>