25 lines
736 B
HTML
25 lines
736 B
HTML
<!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 valueOf() 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);
|
|
|
|
shouldBe("plugin[Symbol.toPrimitive]", "undefined");
|
|
shouldBe("plugin.valueOf()", "123456789");
|
|
shouldBeTrue("plugin == 123456789");
|
|
var successfullyParsed = true;
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|