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

Unified Diff: LayoutTests/fast/regex/script-tests/lastIndex.js

Issue 20867002: Remove old tests that have been migrated to the v8 repo. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove unused script-tests as well 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: LayoutTests/fast/regex/script-tests/lastIndex.js
diff --git a/LayoutTests/fast/regex/script-tests/lastIndex.js b/LayoutTests/fast/regex/script-tests/lastIndex.js
deleted file mode 100644
index 53d5124ffa816cb8581cb6513115c5ef6780d28f..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/regex/script-tests/lastIndex.js
+++ /dev/null
@@ -1,48 +0,0 @@
-description(
-"This page tests that a RegExp object's lastIndex behaves like a regular property."
-);
-
-// lastIndex is not configurable
-shouldBeFalse("delete /x/.lastIndex");
-shouldThrow("'use strict'; delete /x/.lastIndex");
-
-// lastIndex is not enumerable
-shouldBeTrue("'lastIndex' in /x/");
-shouldBeTrue("for (property in /x/) if (property === 'lastIndex') throw false; true");
-
-// lastIndex is writable
-shouldBeTrue("var re = /x/; re.lastIndex = re; re.lastIndex === re");
-
-// Cannot redefine lastIndex as an accessor
-shouldThrow("Object.defineProperty(/x/, {get:function(){}})");
-
-// Cannot redefine lastIndex as enumerable
-shouldThrow("Object.defineProperty(/x/, 'lastIndex', {enumerable:true}); true");
-shouldBeTrue("Object.defineProperty(/x/, 'lastIndex', {enumerable:false}); true");
-
-// Cannot redefine lastIndex as configurable
-shouldThrow("Object.defineProperty(/x/, 'lastIndex', {configurable:true}); true");
-shouldBeTrue("Object.defineProperty(/x/, 'lastIndex', {configurable:false}); true");
-
-// Can redefine lastIndex as read-only
-shouldBe("var re = Object.defineProperty(/x/, 'lastIndex', {writable:true}); re.lastIndex = 42; re.lastIndex", '42');
-shouldBe("var re = Object.defineProperty(/x/, 'lastIndex', {writable:false}); re.lastIndex = 42; re.lastIndex", '0');
-
-// Can redefine the value
-shouldBe("var re = Object.defineProperty(/x/, 'lastIndex', {value:42}); re.lastIndex", '42');
-
-// Cannot redefine read-only lastIndex as writable
-shouldThrow("Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'lastIndex', {writable:true}); true");
-
-// Can only redefine the value of a read-only lastIndex as the current value
-shouldThrow("Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'lastIndex', {value:42}); true");
-shouldBeTrue("Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'lastIndex', {value:0}); true");
-
-// Trying to run a global regular expression should throw, if lastIndex is read-only
-shouldBe("Object.defineProperty(/x/, 'lastIndex', {writable:false}).exec('')", 'null');
-shouldBe("Object.defineProperty(/x/, 'lastIndex', {writable:false}).exec('x')", '["x"]');
-shouldThrow("Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('')");
-shouldThrow("Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('x')");
-
-// Should be able to freeze a regular expression object.
-shouldBeTrue("var re = /x/; Object.freeze(re); Object.isFrozen(re);");

Powered by Google App Engine
This is Rietveld 408576698