Commit 738c6fa6 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

Enable NoBackgroundTasksTest.FirstNonEmptyPaintWithoutBackgroundTasks on ChromeOS.

The test failed because rendering the NTP was blocked on loading
machine statistics, which was done from a TaskPriority::BACKGROUND
task. The priority of that task was changed to
TaskPriority::USER_BLOCKING in
https://chromium-review.googlesource.com/c/chromium/src/+/1082608, so
the test can be enabled.

The test is still disabled when Mash is enabled, because the
non-empty paint signal isn't fired in this case (even when background
tasks aren't disabled).

Bug: 831835
Change-Id: Ie847b152b057883f62bef060c6294a427980c838
Reviewed-on: https://chromium-review.googlesource.com/1082609Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565421}
parent 15291e9c
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_observer.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ui_base_features.h"
namespace { namespace {
...@@ -54,10 +55,8 @@ class NoBackgroundTasksTest : public InProcessBrowserTest { ...@@ -54,10 +55,8 @@ class NoBackgroundTasksTest : public InProcessBrowserTest {
// Verify that it is possible to get the first non-empty paint without running // Verify that it is possible to get the first non-empty paint without running
// background tasks. // background tasks.
// //
// TODO(fdoray): Enable on ChromeOS once all dependencies on background tasks to // TODO(fdoray): This test is flaky on Mac: https://crbug.com/833989
// produce the first non-empty paint have been removed. https://crbug.com/831835 #if defined(OS_MACOSX)
// This test is flaky on Mac: https://crbug.com/833989
#if defined(OS_CHROMEOS) || defined(OS_MACOSX)
#define MAYBE_FirstNonEmptyPaintWithoutBackgroundTasks \ #define MAYBE_FirstNonEmptyPaintWithoutBackgroundTasks \
DISABLED_FirstNonEmptyPaintWithoutBackgroundTasks DISABLED_FirstNonEmptyPaintWithoutBackgroundTasks
#else #else
...@@ -66,6 +65,14 @@ class NoBackgroundTasksTest : public InProcessBrowserTest { ...@@ -66,6 +65,14 @@ class NoBackgroundTasksTest : public InProcessBrowserTest {
#endif #endif
IN_PROC_BROWSER_TEST_F(NoBackgroundTasksTest, IN_PROC_BROWSER_TEST_F(NoBackgroundTasksTest,
MAYBE_FirstNonEmptyPaintWithoutBackgroundTasks) { MAYBE_FirstNonEmptyPaintWithoutBackgroundTasks) {
#if defined(OS_CHROMEOS)
// TODO(fdoray): With Mash, RenderWidgetHostImpl::DidProcessFrame() isn't
// called in the browser process and the first non-empty paint signal isn't
// dispatched. https://crbug.com/831835
if (features::IsMashEnabled())
return;
#endif
RunLoopUntilNonEmptyPaint run_loop_until_non_empty_paint( RunLoopUntilNonEmptyPaint run_loop_until_non_empty_paint(
browser()->tab_strip_model()->GetActiveWebContents()); browser()->tab_strip_model()->GetActiveWebContents());
run_loop_until_non_empty_paint.RunUntilIdle(); run_loop_until_non_empty_paint.RunUntilIdle();
......
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