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

Unified Diff: test/cctest/test-api.cc

Issue 1366063002: [es6] Remove left-overs from Function.prototype.toMethod. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « src/runtime/runtime-classes.cc ('k') | test/mjsunit/es6/toMethod.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 197634dc314681ad590f784851ea68fa52aacf5c..d55ad6915ff6843c67f9198ee075f1fe449b328c 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -8792,60 +8792,6 @@ THREADED_TEST(AccessControlGetOwnPropertyNames) {
}
-TEST(SuperAccessControl) {
- i::FLAG_allow_natives_syntax = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope handle_scope(isolate);
- v8::Handle<v8::ObjectTemplate> obj_template =
- v8::ObjectTemplate::New(isolate);
- obj_template->SetAccessCheckCallbacks(AccessAlwaysBlocked, NULL);
- LocalContext env;
- env->Global()->Set(v8_str("prohibited"), obj_template->NewInstance());
-
- {
- v8::TryCatch try_catch(isolate);
- CompileRun(
- "var f = { m() { return super.hasOwnProperty; } }.m;"
- "var m = %ToMethod(f, prohibited);"
- "m();");
- CHECK(try_catch.HasCaught());
- }
-
- {
- v8::TryCatch try_catch(isolate);
- CompileRun(
- "var f = {m() { return super[42]; } }.m;"
- "var m = %ToMethod(f, prohibited);"
- "m();");
- CHECK(try_catch.HasCaught());
- }
-
- {
- v8::TryCatch try_catch(isolate);
- CompileRun(
- "var f = {m() { super.hasOwnProperty = function () {}; } }.m;"
- "var m = %ToMethod(f, prohibited);"
- "m();");
- CHECK(try_catch.HasCaught());
- }
-
- {
- v8::TryCatch try_catch(isolate);
- CompileRun(
- "Object.defineProperty(Object.prototype, 'x', { set : function(){}});"
- "var f = {"
- " m() { "
- " 'use strict';"
- " super.x = function () {};"
- " }"
- "}.m;"
- "var m = %ToMethod(f, prohibited);"
- "m();");
- CHECK(try_catch.HasCaught());
- }
-}
-
-
TEST(Regress470113) {
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | test/mjsunit/es6/toMethod.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698