Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / regexp-test-null-string.html
blob46bc76752ca62a4c00f0061b3ac29d9285bdb395
1 <p>
2 This page tests the exception you get when you test a regular expression against
3 the null string. If the test passes, you'll see a PASS message below.
4 </p>
5 <pre id="console"></pre>
7 <script>
8 function log(s)
10 document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
13 function shouldBe(a, aDescription, b)
15 if (a == b) {
16 log("PASS: " + aDescription + " should be '" + String(b) + "' and is.");
17 return;
20 log ("FAIL: " + aDescription + " should be '" + String(b) + "' but instead is '" + String(a) + "'.");
23 if (window.testRunner)
24 testRunner.dumpAsText();
26 var result = /define/.test();
27 shouldBe(result, "result", true);
28 </script>