| Index: third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp b/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
|
| index 5af3fcb30da5b45490114eaa77c0df89c33db5fd..ced38afacd1f18a76e8890eee8115594935f4fa9 100644
|
| --- a/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
|
| @@ -8,42 +8,14 @@
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebViewScheduler.h"
|
| #include "public/web/WebLocalFrame.h"
|
| -#include "public/web/WebScriptExecutionCallback.h"
|
| -#include "public/web/WebScriptSource.h"
|
| #include "public/web/WebView.h"
|
| #include "web/tests/sim/SimRequest.h"
|
| #include "web/tests/sim/SimTest.h"
|
|
|
| namespace blink {
|
|
|
| -namespace {
|
| -class ScriptExecutionCallbackHelper : public WebScriptExecutionCallback {
|
| - public:
|
| - const String Result() const { return result_; }
|
| -
|
| - private:
|
| - void Completed(const WebVector<v8::Local<v8::Value>>& values) override {
|
| - if (!values.IsEmpty() && !values[0].IsEmpty() && values[0]->IsString()) {
|
| - result_ = ToCoreString(v8::Local<v8::String>::Cast(values[0]));
|
| - }
|
| - }
|
| -
|
| - String result_;
|
| -};
|
| -} // namespace
|
| -
|
| class VirtualTimeTest : public SimTest {
|
| protected:
|
| - String ExecuteJavaScript(String script_source) {
|
| - ScriptExecutionCallbackHelper callback_helper;
|
| - WebView()
|
| - .MainFrame()
|
| - ->ToWebLocalFrame()
|
| - ->RequestExecuteScriptAndReturnValue(
|
| - WebScriptSource(WebString(script_source)), false, &callback_helper);
|
| - return callback_helper.Result();
|
| - }
|
| -
|
| void TearDown() override {
|
| // The SimTest destructor calls runPendingTasks. This is a problem because
|
| // if there are any repeating tasks, advancing virtual time will cause the
|
|
|