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

Side by Side Diff: test/cctest/test-api.cc

Issue 351853005: Split SetProperty(...attributes, strictmode) into AddProperty(...attributes) and SetProperty(...… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 21701 matching lines...) Expand 10 before | Expand all | Expand 10 after
21712 CompileRun("other.x;"); 21712 CompileRun("other.x;");
21713 CHECK(access_check_fail_thrown); 21713 CHECK(access_check_fail_thrown);
21714 CHECK(try_catch.HasCaught()); 21714 CHECK(try_catch.HasCaught());
21715 } 21715 }
21716 21716
21717 CheckCorrectThrow("other.x"); 21717 CheckCorrectThrow("other.x");
21718 CheckCorrectThrow("other[1]"); 21718 CheckCorrectThrow("other[1]");
21719 CheckCorrectThrow("JSON.stringify(other)"); 21719 CheckCorrectThrow("JSON.stringify(other)");
21720 CheckCorrectThrow("has_own_property(other, 'x')"); 21720 CheckCorrectThrow("has_own_property(other, 'x')");
21721 CheckCorrectThrow("%GetProperty(other, 'x')"); 21721 CheckCorrectThrow("%GetProperty(other, 'x')");
21722 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 1, 0)"); 21722 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)");
21723 CheckCorrectThrow("%IgnoreAttributesAndSetProperty(other, 'x', 'foo')"); 21723 CheckCorrectThrow("%IgnoreAttributesAndSetProperty(other, 'x', 'foo')");
21724 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); 21724 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)");
21725 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); 21725 CheckCorrectThrow("%DeleteProperty(other, '1', 0)");
21726 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); 21726 CheckCorrectThrow("%HasOwnProperty(other, 'x')");
21727 CheckCorrectThrow("%HasProperty(other, 'x')"); 21727 CheckCorrectThrow("%HasProperty(other, 'x')");
21728 CheckCorrectThrow("%HasElement(other, 1)"); 21728 CheckCorrectThrow("%HasElement(other, 1)");
21729 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); 21729 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')");
21730 CheckCorrectThrow("%GetPropertyNames(other)"); 21730 CheckCorrectThrow("%GetPropertyNames(other)");
21731 // PROPERTY_ATTRIBUTES_NONE = 0 21731 // PROPERTY_ATTRIBUTES_NONE = 0
21732 CheckCorrectThrow("%GetOwnPropertyNames(other, 0)"); 21732 CheckCorrectThrow("%GetOwnPropertyNames(other, 0)");
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
22754 call_eval_context = v8::Context::New(isolate); 22754 call_eval_context = v8::Context::New(isolate);
22755 v8::Context::Scope scope(call_eval_context); 22755 v8::Context::Scope scope(call_eval_context);
22756 call_eval_bound_function = 22756 call_eval_bound_function =
22757 Local<Function>::Cast(CompileRun("eval.bind(this, '1')")); 22757 Local<Function>::Cast(CompileRun("eval.bind(this, '1')"));
22758 } 22758 }
22759 env->Global()->Set(v8_str("CallEval"), 22759 env->Global()->Set(v8_str("CallEval"),
22760 v8::FunctionTemplate::New(isolate, CallEval)->GetFunction()); 22760 v8::FunctionTemplate::New(isolate, CallEval)->GetFunction());
22761 Local<Value> result = CompileRun("CallEval();"); 22761 Local<Value> result = CompileRun("CallEval();");
22762 CHECK_EQ(result, v8::Integer::New(isolate, 1)); 22762 CHECK_EQ(result, v8::Integer::New(isolate, 1));
22763 } 22763 }
OLDNEW
« src/runtime.cc ('K') | « src/weak_collection.js ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698