| Index: content/browser/frame_host/debug_urls.cc
|
| diff --git a/content/browser/frame_host/debug_urls.cc b/content/browser/frame_host/debug_urls.cc
|
| index f095f8e51e1ce000c58fe8c3bdd5f7cb1a9f1dff..1f93ce19fe549e0b0df9685f424d065ca038320c 100644
|
| --- a/content/browser/frame_host/debug_urls.cc
|
| +++ b/content/browser/frame_host/debug_urls.cc
|
| @@ -30,6 +30,11 @@
|
|
|
| namespace content {
|
|
|
| +class ScopedAllowWaitForDebugURL {
|
| + private:
|
| + base::ThreadRestrictions::ScopedAllowWait wait;
|
| +};
|
| +
|
| namespace {
|
|
|
| // Define the Asan debug URLs.
|
| @@ -163,14 +168,13 @@ bool HandleAsanDebugURL(const GURL& url) {
|
| return true;
|
| }
|
|
|
| +void HangCurrentThread() {
|
| + ScopedAllowWaitForDebugURL allow_wait;
|
| + base::WaitableEvent(false, false).Wait();
|
| +}
|
|
|
| } // namespace
|
|
|
| -class ScopedAllowWaitForDebugURL {
|
| - private:
|
| - base::ThreadRestrictions::ScopedAllowWait wait;
|
| -};
|
| -
|
| bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
| // Ensure that the user explicitly navigated to this URL, unless
|
| // kEnableGpuBenchmarking is enabled by Telemetry.
|
| @@ -198,8 +202,11 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
| }
|
|
|
| if (url == GURL(kChromeUIBrowserUIHang)) {
|
| - ScopedAllowWaitForDebugURL allow_wait;
|
| - base::WaitableEvent(false, false).Wait();
|
| + // Webdriver waits for the onload event in javascript which needs a little
|
| + // more time to fire.
|
| + BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE,
|
| + base::Bind(&HangCurrentThread),
|
| + base::TimeDelta::FromSeconds(1));
|
| return true;
|
| }
|
|
|
|
|