Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 2727213002: Disable LayerTreeHostScrollTestImplSideInvalidation.RunMultiThread_DelegatingRenderer due to flakes. (Closed)
Patch Set: for realz this time Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/threading/thread_task_runner_handle.h" 11 #include "base/threading/thread_task_runner_handle.h"
12 #include "build/build_config.h"
12 #include "cc/animation/animation_host.h" 13 #include "cc/animation/animation_host.h"
13 #include "cc/base/completion_event.h" 14 #include "cc/base/completion_event.h"
14 #include "cc/input/main_thread_scrolling_reason.h" 15 #include "cc/input/main_thread_scrolling_reason.h"
15 #include "cc/input/scroll_elasticity_helper.h" 16 #include "cc/input/scroll_elasticity_helper.h"
16 #include "cc/layers/layer.h" 17 #include "cc/layers/layer.h"
17 #include "cc/layers/layer_impl.h" 18 #include "cc/layers/layer_impl.h"
18 #include "cc/layers/picture_layer.h" 19 #include "cc/layers/picture_layer.h"
19 #include "cc/scheduler/begin_frame_source.h" 20 #include "cc/scheduler/begin_frame_source.h"
20 #include "cc/test/fake_content_layer_client.h" 21 #include "cc/test/fake_content_layer_client.h"
21 #include "cc/test/fake_layer_tree_host_client.h" 22 #include "cc/test/fake_layer_tree_host_client.h"
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 void AfterTest() override {} 2065 void AfterTest() override {}
2065 2066
2066 private: 2067 private:
2067 gfx::ScrollOffset initial_scroll_; 2068 gfx::ScrollOffset initial_scroll_;
2068 gfx::ScrollOffset second_scroll_; 2069 gfx::ScrollOffset second_scroll_;
2069 gfx::Vector2dF scroll_amount_; 2070 gfx::Vector2dF scroll_amount_;
2070 }; 2071 };
2071 2072
2072 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate); 2073 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate);
2073 2074
2074 class LayerTreeHostScrollTestImplSideInvalidation 2075 // Disabled due to flakes/crashes on Linux TSan Tests and on
2076 // linux_chromium_asan_rel; see https://crbug.com/697652.
2077 #if defined(OS_LINUX)
2078 #define MAYBE_LayerTreeHostScrollTestImplSideInvalidation \
2079 DISABLED_LayerTreeHostScrollTestImplSideInvalidation
2080 #else
2081 #define MAYBE_LayerTreeHostScrollTestImplSideInvalidation \
2082 LayerTreeHostScrollTestImplSideInvalidation
2083 #endif
2084 class MAYBE_LayerTreeHostScrollTestImplSideInvalidation
2075 : public LayerTreeHostScrollTest { 2085 : public LayerTreeHostScrollTest {
2076 void BeginTest() override { 2086 void BeginTest() override {
2077 layer_tree_host()->outer_viewport_scroll_layer()->set_did_scroll_callback( 2087 layer_tree_host()->outer_viewport_scroll_layer()->set_did_scroll_callback(
2078 base::Bind(&LayerTreeHostScrollTestImplSideInvalidation:: 2088 base::Bind(&MAYBE_LayerTreeHostScrollTestImplSideInvalidation::
2079 DidScrollOuterViewport, 2089 DidScrollOuterViewport,
2080 base::Unretained(this))); 2090 base::Unretained(this)));
2081 PostSetNeedsCommitToMainThread(); 2091 PostSetNeedsCommitToMainThread();
2082 } 2092 }
2083 2093
2084 void DidScrollOuterViewport(const gfx::ScrollOffset& offset) { 2094 void DidScrollOuterViewport(const gfx::ScrollOffset& offset) {
2085 // Defer responding to the main frame until an impl-side pending tree is 2095 // Defer responding to the main frame until an impl-side pending tree is
2086 // created for the invalidation request. 2096 // created for the invalidation request.
2087 { 2097 {
2088 CompletionEvent completion; 2098 CompletionEvent completion;
2089 task_runner_provider()->ImplThreadTaskRunner()->PostTask( 2099 task_runner_provider()->ImplThreadTaskRunner()->PostTask(
2090 FROM_HERE, 2100 FROM_HERE,
2091 base::Bind(&LayerTreeHostScrollTestImplSideInvalidation:: 2101 base::Bind(&MAYBE_LayerTreeHostScrollTestImplSideInvalidation::
2092 WaitForInvalidationOnImplThread, 2102 WaitForInvalidationOnImplThread,
2093 base::Unretained(this), &completion)); 2103 base::Unretained(this), &completion));
2094 completion.Wait(); 2104 completion.Wait();
2095 } 2105 }
2096 2106
2097 switch (++num_of_deltas_) { 2107 switch (++num_of_deltas_) {
2098 case 1: { 2108 case 1: {
2099 // First set of deltas is here. The impl thread will scroll to the 2109 // First set of deltas is here. The impl thread will scroll to the
2100 // second case on activation, so add a delta from the main thread that 2110 // second case on activation, so add a delta from the main thread that
2101 // takes us to the final value. 2111 // takes us to the final value.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 // Impl thread. 2242 // Impl thread.
2233 int num_of_activations_ = 0; 2243 int num_of_activations_ = 0;
2234 int num_of_main_frames_ = 0; 2244 int num_of_main_frames_ = 0;
2235 bool invalidated_on_impl_thread_ = false; 2245 bool invalidated_on_impl_thread_ = false;
2236 CompletionEvent* impl_side_invalidation_event_ = nullptr; 2246 CompletionEvent* impl_side_invalidation_event_ = nullptr;
2237 2247
2238 // Main thread. 2248 // Main thread.
2239 int num_of_deltas_ = 0; 2249 int num_of_deltas_ = 0;
2240 }; 2250 };
2241 2251
2242 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestImplSideInvalidation); 2252 MULTI_THREAD_TEST_F(MAYBE_LayerTreeHostScrollTestImplSideInvalidation);
2243 2253
2244 } // namespace 2254 } // namespace
2245 } // namespace cc 2255 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698