blob: 95e23ce18632b7ff77c390639ec5ac0681ff3e43 [file] [log] [blame]
<html>
<script>
function runTest()
{
if (window.testRunner)
testRunner.dumpAsText();
var plugin = document.getElementById("testPlugin");
var symbol = Symbol("Cappuccino");
// Put.
plugin[symbol] = 20;
// Get.
var result = plugin[symbol];
if (result !== 20)
return;
// Missing Get.
var missing = plugin[Symbol("Cocoa")];
if (missing !== undefined)
return;
// Delete an existing property.
if (!(delete plugin[symbol]))
return;
if (plugin[symbol] !== undefined)
return;
// Delete an non-exisitng property.
if (!(delete plugin[Symbol("Cappuccino")]))
return;
document.getElementById("result").innerHTML = "SUCCESS";
}
</script>
<body onload="runTest();">
<pre>
This tests that NPAPI plugin object can accept ES6 symbols without crash.
<div id="result">FAILURE</div>
<embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" height="200"></embed>
</body>
</html>