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

Unified Diff: test/mjsunit/regexp.js

Issue 1419823010: Implement flag and source getters on RegExp.prototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rproto
Patch Set: new webkit expectations Created 5 years, 1 month 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/mjsunit/regexp.js
diff --git a/test/mjsunit/regexp.js b/test/mjsunit/regexp.js
index c2d92823bce985a3c66e1cba873da85e7cab4d94..6374296210bb53ed75ab67684043e50f6ecd47e7 100644
--- a/test/mjsunit/regexp.js
+++ b/test/mjsunit/regexp.js
@@ -605,23 +605,29 @@ assertEquals(["ts", "li"], log);
// Check that properties of RegExp have the correct permissions.
var re = /x/g;
-var desc = Object.getOwnPropertyDescriptor(re, "global");
-assertEquals(true, desc.value);
-assertEquals(false, desc.configurable);
+var desc = Object.getOwnPropertyDescriptor(re.__proto__, "global");
+assertInstanceof(desc.get, Function);
+assertEquals(true, desc.configurable);
assertEquals(false, desc.enumerable);
-assertEquals(false, desc.writable);
-desc = Object.getOwnPropertyDescriptor(re, "multiline");
-assertEquals(false, desc.value);
-assertEquals(false, desc.configurable);
+desc = Object.getOwnPropertyDescriptor(re.__proto__, "multiline");
+assertInstanceof(desc.get, Function);
+assertEquals(true, desc.configurable);
assertEquals(false, desc.enumerable);
-assertEquals(false, desc.writable);
-desc = Object.getOwnPropertyDescriptor(re, "ignoreCase");
-assertEquals(false, desc.value);
-assertEquals(false, desc.configurable);
+desc = Object.getOwnPropertyDescriptor(re.__proto__, "ignoreCase");
+assertInstanceof(desc.get, Function);
+assertEquals(true, desc.configurable);
assertEquals(false, desc.enumerable);
-assertEquals(false, desc.writable);
+
+desc = Object.getOwnPropertyDescriptor(re, "global");
+assertEquals(undefined, desc);
+
+desc = Object.getOwnPropertyDescriptor(re, "multiline");
+assertEquals(undefined, desc);
+
+desc = Object.getOwnPropertyDescriptor(re, "ignoreCase");
+assertEquals(undefined, desc);
desc = Object.getOwnPropertyDescriptor(re, "lastIndex");
assertEquals(0, desc.value);

Powered by Google App Engine
This is Rietveld 408576698