| 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 76c8855b10b238826bd308fd7b167bd109946ede..a1c4451ff3de88994f9599bf992777454606ca3b 100644
|
| --- a/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
|
| @@ -41,6 +41,14 @@ protected:
|
| WebScriptSource(WebString(scriptSource)), false, &callbackHelper);
|
| return callbackHelper.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 runloop to busy loop. Pausing
|
| + // virtual time here fixes that.
|
| + webView().scheduler()->setVirtualTimePolicy(WebViewScheduler::VirtualTimePolicy::PAUSE);
|
| + }
|
| };
|
|
|
| namespace {
|
|
|