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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 2339123002: [builtins] Move StringLastIndexOf to a builtin. (Closed)
Patch Set: variable renaming Created 4 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:
Download patch
« src/js/i18n.js ('K') | « src/runtime/runtime-strings.cc ('k') | no next file » | 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 cc14ffa2d32e003f81d05c9798ae2c08c557e8be..dbae323c3b1a8e4e7008b336043f20d477b64f01 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -7452,30 +7452,6 @@ TEST(ExceptionExtensions) {
}
-static const char* kNativeCallInExtensionSource =
- "function call_runtime_last_index_of(x) {"
- " return %StringLastIndexOf(x, 'bob', 10);"
Franzi 2016/09/14 15:05:01 Rather than deleting the test, can we use a differ
Benedikt Meurer 2016/09/14 17:02:32 Yes, that's correct. Please keep the test.
- "}";
-
-
-static const char* kNativeCallTest =
- "call_runtime_last_index_of('bobbobboellebobboellebobbob');";
-
-// Test that a native runtime calls are supported in extensions.
-TEST(NativeCallInExtensions) {
- v8::HandleScope handle_scope(CcTest::isolate());
- v8::RegisterExtension(
- new Extension("nativecall", kNativeCallInExtensionSource));
- const char* extension_names[] = {"nativecall"};
- v8::ExtensionConfiguration extensions(1, extension_names);
- v8::Local<Context> context = Context::New(CcTest::isolate(), &extensions);
- Context::Scope lock(context);
- v8::Local<Value> result = CompileRun(kNativeCallTest);
- CHECK(result->Equals(context, v8::Integer::New(CcTest::isolate(), 3))
- .FromJust());
-}
-
-
class NativeFunctionExtension : public Extension {
public:
NativeFunctionExtension(const char* name, const char* source,
« src/js/i18n.js ('K') | « src/runtime/runtime-strings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698