| Index: third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp b/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5e330ba12947a1ca5a08c0d4576b2062fde62db7
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/testing/CallbackFunctionTest.h"
|
| +
|
| +#include "bindings/core/v8/ScriptState.h"
|
| +#include "bindings/core/v8/V8Binding.h"
|
| +#include "bindings/core/v8/V8TestCallback.h"
|
| +
|
| +namespace blink {
|
| +
|
| +DEFINE_TRACE(CallbackFunctionTest)
|
| +{
|
| +}
|
| +
|
| +String CallbackFunctionTest::testCallback(ScriptState* scriptState, V8TestCallback* callback, String msg1, String msg2, ExceptionState& exceptionState)
|
| +{
|
| + ScriptWrappable* scriptWrappable = nullptr;
|
| + String returnValue;
|
| +
|
| + if (callback->call(scriptState, scriptWrappable, msg1, msg2, returnValue)) {
|
| + return String("SUCCESS: ") + returnValue;
|
| + }
|
| + return String("Error!");
|
| +}
|
| +
|
| +} // namespace blink
|
|
|