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

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

Issue 916753002: remove undetectable strings (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/objects.cc ('k') | tools/v8heapconst.py » ('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 5d07cd884a08ef5f0a7aa05526ba7cc3c2caf8e9..95a64a91cfcc15ad5ee6391857fda20119ff60e8 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -5775,80 +5775,6 @@ THREADED_TEST(ExtensibleOnUndetectable) {
}
-THREADED_TEST(UndetectableString) {
- LocalContext env;
- v8::HandleScope scope(env->GetIsolate());
-
- Local<String> obj = String::NewFromUtf8(env->GetIsolate(), "foo",
- String::kUndetectableString);
- env->Global()->Set(v8_str("undetectable"), obj);
-
- ExpectString("undetectable", "foo");
- ExpectString("typeof undetectable", "undefined");
- ExpectString("typeof(undetectable)", "undefined");
- ExpectBoolean("typeof undetectable == 'undefined'", true);
- ExpectBoolean("typeof undetectable == 'string'", false);
- ExpectBoolean("if (undetectable) { true; } else { false; }", false);
- ExpectBoolean("!undetectable", true);
-
- ExpectObject("true&&undetectable", obj);
- ExpectBoolean("false&&undetectable", false);
- ExpectBoolean("true||undetectable", true);
- ExpectObject("false||undetectable", obj);
-
- ExpectObject("undetectable&&true", obj);
- ExpectObject("undetectable&&false", obj);
- ExpectBoolean("undetectable||true", true);
- ExpectBoolean("undetectable||false", false);
-
- ExpectBoolean("undetectable==null", true);
- ExpectBoolean("null==undetectable", true);
- ExpectBoolean("undetectable==undefined", true);
- ExpectBoolean("undefined==undetectable", true);
- ExpectBoolean("undetectable==undetectable", true);
-
-
- ExpectBoolean("undetectable===null", false);
- ExpectBoolean("null===undetectable", false);
- ExpectBoolean("undetectable===undefined", false);
- ExpectBoolean("undefined===undetectable", false);
- ExpectBoolean("undetectable===undetectable", true);
-}
-
-
-TEST(UndetectableOptimized) {
- i::FLAG_allow_natives_syntax = true;
- LocalContext env;
- v8::HandleScope scope(env->GetIsolate());
-
- Local<String> obj = String::NewFromUtf8(env->GetIsolate(), "foo",
- String::kUndetectableString);
- env->Global()->Set(v8_str("undetectable"), obj);
- env->Global()->Set(v8_str("detectable"), v8_str("bar"));
-
- ExpectString(
- "function testBranch() {"
- " if (!%_IsUndetectableObject(undetectable)) throw 1;"
- " if (%_IsUndetectableObject(detectable)) throw 2;"
- "}\n"
- "function testBool() {"
- " var b1 = !%_IsUndetectableObject(undetectable);"
- " var b2 = %_IsUndetectableObject(detectable);"
- " if (b1) throw 3;"
- " if (b2) throw 4;"
- " return b1 == b2;"
- "}\n"
- "%OptimizeFunctionOnNextCall(testBranch);"
- "%OptimizeFunctionOnNextCall(testBool);"
- "for (var i = 0; i < 10; i++) {"
- " testBranch();"
- " testBool();"
- "}\n"
- "\"PASS\"",
- "PASS");
-}
-
-
// The point of this test is type checking. We run it only so compilers
// don't complain about an unused function.
TEST(PersistentHandles) {
« no previous file with comments | « src/objects.cc ('k') | tools/v8heapconst.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698