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

Unified Diff: test/mjsunit/readonly.js

Issue 178583005: Move all Harmony-only tests to harmony/ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/mjsunit/proto-accessor.js ('k') | test/mjsunit/regress/regress-173361.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/readonly.js
diff --git a/test/mjsunit/readonly.js b/test/mjsunit/readonly.js
index 4d06b7cf43c31acb8a24ffe6d3adb04c30ec14fc..132712502d986548477fa1883dd0d9ddd7d307b1 100644
--- a/test/mjsunit/readonly.js
+++ b/test/mjsunit/readonly.js
@@ -25,7 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --harmony-proxies --es5_readonly
+// Flags: --allow-natives-syntax --es5_readonly
+// Flags: --harmony-proxies
// Different ways to create an object.
@@ -120,8 +121,12 @@ function ReadonlyByProto(o, name) {
o.__proto__ = p;
}
+// Allow Proxy to be undefined, so test can run in non-Harmony mdoe as well.
Jakob Kummerow 2014/02/28 14:25:01 nit: s/mdoe/mode/
+var global = this;
+
function ReadonlyByProxy(o, name) {
- var p = Proxy.create({
+ if (!global.Proxy) return ReadonlyByFreeze(o, name); // Dummy.
+ var p = global.Proxy.create({
getPropertyDescriptor: function() {
return {value: -46, writable: false, configurable: true};
}
« no previous file with comments | « test/mjsunit/proto-accessor.js ('k') | test/mjsunit/regress/regress-173361.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698