Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: test/webkit/fast/regex/early-acid3-86.js

Issue 20280003: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/webkit/fast/regex/dotstar-expected.txt ('k') | test/webkit/fast/regex/early-acid3-86-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/fast/regex/early-acid3-86.js
diff --git a/test/webkit/toString-recursion.js b/test/webkit/fast/regex/early-acid3-86.js
similarity index 80%
copy from test/webkit/toString-recursion.js
copy to test/webkit/fast/regex/early-acid3-86.js
index 51e9f98c2d28665b9a969aa801aacad83c548856..488364f0b3adcab0cf181764694c1eeed2cd6a7e 100644
--- a/test/webkit/toString-recursion.js
+++ b/test/webkit/fast/regex/early-acid3-86.js
@@ -22,14 +22,12 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
description(
-"This test checks that toString() does not have a problem when an object has itself as a property."
+'Test that covers capturing brackets, and was adapted from a part of an early version of Acid3.'
);
-// Array (elements)
-shouldBe("var array = []; array[0] = array; array + ''", "''");
-
-// Error (name, message)
-shouldBe("var error = new Error; error.name = error; error.message = error; error + ''", "''");
-
-// RegExp (source)
-shouldBe("var regexp = /a/; regexp.source = regexp; regexp + ''", "'/a/'");
+// JS regexps aren't like Perl regexps, if their character
+// classes start with a ] that means they're empty. So this
+// is a syntax error; if we get here it's a bug.
+shouldThrow("/TA[])]/.exec('TA]')");
+shouldBe("/[]/.exec('')", "null");
+shouldBe("/(\\3)(\\1)(a)/.exec('cat').toString()", "'a,,,a'");
« no previous file with comments | « test/webkit/fast/regex/dotstar-expected.txt ('k') | test/webkit/fast/regex/early-acid3-86-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698