aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-api.cc')
-rw-r--r--deps/v8/test/cctest/test-api.cc69
1 files changed, 0 insertions, 69 deletions
diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc
index d18667018d..2b50db7ecd 100644
--- a/deps/v8/test/cctest/test-api.cc
+++ b/deps/v8/test/cctest/test-api.cc
@@ -11308,72 +11308,3 @@ TEST(GCInFailedAccessCheckCallback) {
// the other tests.
v8::V8::SetFailedAccessCheckCallbackFunction(NULL);
}
-
-
-TEST(StringCheckMultipleContexts) {
- const char* code =
- "(function() { return \"a\".charAt(0); })()";
-
- {
- // Run the code twice in the first context to initialize the call IC.
- v8::HandleScope scope;
- LocalContext context1;
- ExpectString(code, "a");
- ExpectString(code, "a");
- }
-
- {
- // Change the String.prototype in the second context and check
- // that the right function gets called.
- v8::HandleScope scope;
- LocalContext context2;
- CompileRun("String.prototype.charAt = function() { return \"not a\"; }");
- ExpectString(code, "not a");
- }
-}
-
-
-TEST(NumberCheckMultipleContexts) {
- const char* code =
- "(function() { return (42).toString(); })()";
-
- {
- // Run the code twice in the first context to initialize the call IC.
- v8::HandleScope scope;
- LocalContext context1;
- ExpectString(code, "42");
- ExpectString(code, "42");
- }
-
- {
- // Change the Number.prototype in the second context and check
- // that the right function gets called.
- v8::HandleScope scope;
- LocalContext context2;
- CompileRun("Number.prototype.toString = function() { return \"not 42\"; }");
- ExpectString(code, "not 42");
- }
-}
-
-
-TEST(BooleanCheckMultipleContexts) {
- const char* code =
- "(function() { return true.toString(); })()";
-
- {
- // Run the code twice in the first context to initialize the call IC.
- v8::HandleScope scope;
- LocalContext context1;
- ExpectString(code, "true");
- ExpectString(code, "true");
- }
-
- {
- // Change the Boolean.prototype in the second context and check
- // that the right function gets called.
- v8::HandleScope scope;
- LocalContext context2;
- CompileRun("Boolean.prototype.toString = function() { return \"\"; }");
- ExpectString(code, "");
- }
-}