Commit 50ebf37e authored by Liviu Tinta's avatar Liviu Tinta Committed by Chromium LUCI CQ

Schedule frames for popup widget for web tests with compositor thread

When we run web tests with --enable-thread-compositing we have
a compositor thread available.
The code in web_page_popup_impl.cc assumes all web tests are run
single-threaded.
In single-threaded web tests, the owner frame tree runs the
composite step for the popup.
If --enable-thread-compositing is used allow the popup to run
the composite step.

      virtual/scroll-unification/fast/forms/suggestion-picker,
      virtual/scroll-unification/fast/time

Bug: 1144434
TEST: virtual/scroll-unification/fast/forms/select-popup,
Change-Id: I969f825fd6fc331f1e1ed682b98b3e18caeb4f5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2636296
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846249}
parent 99d4525f
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h" #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h" #include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/keyboard_codes.h" #include "third_party/blink/renderer/platform/keyboard_codes.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
#include "third_party/blink/renderer/platform/text/text_direction.h" #include "third_party/blink/renderer/platform/text/text_direction.h"
#include "third_party/blink/renderer/platform/web_test_support.h" #include "third_party/blink/renderer/platform/web_test_support.h"
#include "third_party/blink/renderer/platform/widget/frame_widget.h" #include "third_party/blink/renderer/platform/widget/frame_widget.h"
...@@ -173,9 +174,12 @@ class PagePopupChromeClient final : public EmptyChromeClient { ...@@ -173,9 +174,12 @@ class PagePopupChromeClient final : public EmptyChromeClient {
// do not wish to actually do anything. // do not wish to actually do anything.
if (popup_->closing_) if (popup_->closing_)
return; return;
if (WebTestSupport::IsRunningWebTest()) {
// When the renderer has a compositor thread we need to follow the
// normal code path.
if (WebTestSupport::IsRunningWebTest() && !Thread::CompositorThread()) {
// In single-threaded web tests, the owner frame tree runs the composite // In single-threaded web tests, the owner frame tree runs the composite
// step for the popup. Popup widgets don't runany composite step on their // step for the popup. Popup widgets don't run any composite step on their
// own. And we don't run popup tests with a compositor thread, so no need // own. And we don't run popup tests with a compositor thread, so no need
// to check for that. // to check for that.
Document& opener_document = Document& opener_document =
......
...@@ -789,7 +789,10 @@ ...@@ -789,7 +789,10 @@
}, },
{ {
"prefix": "scroll-unification", "prefix": "scroll-unification",
"bases": ["fast/scrolling/scrollbars"], "bases": ["fast/scrolling/scrollbars",
"fast/forms/select-popup",
"fast/forms/suggestion-picker",
"fast/forms/time"],
"args": ["--enable-features=ScrollUnification", "args": ["--enable-features=ScrollUnification",
"--enable-threaded-compositing"] "--enable-threaded-compositing"]
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment