Commit 5c0577e5 authored by verwaest's avatar verwaest Committed by Commit bot

Remove LayoutTests that test un-spec'ed TypeError message printed

BUG=

Review URL: https://codereview.chromium.org/1471253002

Cr-Commit-Position: refs/heads/master@{#361346}
parent 081b184a
This page tests exceptions thrown from 'new' expressions. If the test passes, you'll see a series of PASS messages below.
FAIL: e1 should be 'TypeError: 'undefined' is not a constructor (evaluating 'new f')' but instead is 'TypeError: f is not a function'.
FAIL: e2 should be 'TypeError: 'undefined' is not a function (evaluating 'g()')' but instead is 'TypeError: g is not a function'.
<p>
This page tests exceptions thrown from 'new' expressions. If the test passes,
you'll see a series of PASS messages below.
</p>
<pre id="console"></pre>
<script>
function log(s)
{
document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
}
function shouldBe(a, aDescription, b)
{
if (a == b) {
log("PASS: " + aDescription + " should be '" + String(b) + "' and is.");
return;
}
log ("FAIL: " + aDescription + " should be '" + String(b) + "' but instead is '" + String(a) + "'.");
}
if (window.testRunner)
testRunner.dumpAsText();
(function () {
try {
var f;
new f;
} catch(e1) {
shouldBe(e1, "e1", "TypeError: 'undefined' is not a constructor (evaluating 'new f')");
}
})();
(function () {
try {
var f;
var g;
new f(g());
} catch(e2) {
shouldBe(e2, "e2", "TypeError: 'undefined' is not a function (evaluating 'g()')");
}
})();
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment