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

Unified Diff: test/webkit/fast/regex/alternative-length-miscalculation.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
Index: test/webkit/fast/regex/alternative-length-miscalculation.js
diff --git a/test/webkit/const-without-initializer.js b/test/webkit/fast/regex/alternative-length-miscalculation.js
similarity index 87%
copy from test/webkit/const-without-initializer.js
copy to test/webkit/fast/regex/alternative-length-miscalculation.js
index 9eb036522a05920b2c1441b387002f91811d1752..7602d5adec08aeabf08066c0420e6e52b497a3f8 100644
--- a/test/webkit/const-without-initializer.js
+++ b/test/webkit/fast/regex/alternative-length-miscalculation.js
@@ -22,13 +22,12 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
description(
-'Tests that declaring a const variable without initializing has the correct behavior and does not crash'
+"This page tests for length miscalculations in regular expression processing."
);
-const f;
+var re = /b|[^b]/g;
+re.lastIndex = 1;
+shouldBe("re.exec('a')", "null");
-shouldBe('f', 'undefined');
-
-f = 10;
-
-shouldBe('f', 'undefined');
+var re2 = /[^a]|ab/;
+shouldBe("re2.test('')", "false");

Powered by Google App Engine
This is Rietveld 408576698