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

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

Issue 2734503002: Fully disable LayerTreeHostScrollTestImplSideInvalidation due to crashes (Closed)
Patch Set: 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"
13 #include "cc/animation/animation_host.h" 12 #include "cc/animation/animation_host.h"
14 #include "cc/base/completion_event.h" 13 #include "cc/base/completion_event.h"
15 #include "cc/input/main_thread_scrolling_reason.h" 14 #include "cc/input/main_thread_scrolling_reason.h"
16 #include "cc/input/scroll_elasticity_helper.h" 15 #include "cc/input/scroll_elasticity_helper.h"
17 #include "cc/layers/layer.h" 16 #include "cc/layers/layer.h"
18 #include "cc/layers/layer_impl.h" 17 #include "cc/layers/layer_impl.h"
19 #include "cc/layers/picture_layer.h" 18 #include "cc/layers/picture_layer.h"
20 #include "cc/scheduler/begin_frame_source.h" 19 #include "cc/scheduler/begin_frame_source.h"
21 #include "cc/test/fake_content_layer_client.h" 20 #include "cc/test/fake_content_layer_client.h"
22 #include "cc/test/fake_layer_tree_host_client.h" 21 #include "cc/test/fake_layer_tree_host_client.h"
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 void AfterTest() override {} 2064 void AfterTest() override {}
2066 2065
2067 private: 2066 private:
2068 gfx::ScrollOffset initial_scroll_; 2067 gfx::ScrollOffset initial_scroll_;
2069 gfx::ScrollOffset second_scroll_; 2068 gfx::ScrollOffset second_scroll_;
2070 gfx::Vector2dF scroll_amount_; 2069 gfx::Vector2dF scroll_amount_;
2071 }; 2070 };
2072 2071
2073 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate); 2072 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate);
2074 2073
2075 // Disabled due to flakes/crashes on Linux TSan Tests, linux_chromium_asan_rel 2074 // Disabled due to flakes/crashes, see https://crbug.com/697652.
2076 // and Android N5X Swarm; see https://crbug.com/697652. 2075 class DISABLED_LayerTreeHostScrollTestImplSideInvalidation
2077 #if defined(OS_LINUX) || defined(OS_ANDROID)
2078 #define MAYBE_LayerTreeHostScrollTestImplSideInvalidation \
2079 DISABLED_LayerTreeHostScrollTestImplSideInvalidation
2080 #else
2081 #define MAYBE_LayerTreeHostScrollTestImplSideInvalidation \
2082 LayerTreeHostScrollTestImplSideInvalidation
2083 #endif
2084 class MAYBE_LayerTreeHostScrollTestImplSideInvalidation
2085 : public LayerTreeHostScrollTest { 2076 : public LayerTreeHostScrollTest {
2086 void BeginTest() override { 2077 void BeginTest() override {
2087 layer_tree_host()->outer_viewport_scroll_layer()->set_did_scroll_callback( 2078 layer_tree_host()->outer_viewport_scroll_layer()->set_did_scroll_callback(
2088 base::Bind(&MAYBE_LayerTreeHostScrollTestImplSideInvalidation:: 2079 base::Bind(&DISABLED_LayerTreeHostScrollTestImplSideInvalidation::
2089 DidScrollOuterViewport, 2080 DidScrollOuterViewport,
2090 base::Unretained(this))); 2081 base::Unretained(this)));
2091 PostSetNeedsCommitToMainThread(); 2082 PostSetNeedsCommitToMainThread();
2092 } 2083 }
2093 2084
2094 void DidScrollOuterViewport(const gfx::ScrollOffset& offset) { 2085 void DidScrollOuterViewport(const gfx::ScrollOffset& offset) {
2095 // Defer responding to the main frame until an impl-side pending tree is 2086 // Defer responding to the main frame until an impl-side pending tree is
2096 // created for the invalidation request. 2087 // created for the invalidation request.
2097 { 2088 {
2098 CompletionEvent completion; 2089 CompletionEvent completion;
2099 task_runner_provider()->ImplThreadTaskRunner()->PostTask( 2090 task_runner_provider()->ImplThreadTaskRunner()->PostTask(
2100 FROM_HERE, 2091 FROM_HERE,
2101 base::Bind(&MAYBE_LayerTreeHostScrollTestImplSideInvalidation:: 2092 base::Bind(&DISABLED_LayerTreeHostScrollTestImplSideInvalidation::
2102 WaitForInvalidationOnImplThread, 2093 WaitForInvalidationOnImplThread,
2103 base::Unretained(this), &completion)); 2094 base::Unretained(this), &completion));
2104 completion.Wait(); 2095 completion.Wait();
2105 } 2096 }
2106 2097
2107 switch (++num_of_deltas_) { 2098 switch (++num_of_deltas_) {
2108 case 1: { 2099 case 1: {
2109 // First set of deltas is here. The impl thread will scroll to the 2100 // First set of deltas is here. The impl thread will scroll to the
2110 // second case on activation, so add a delta from the main thread that 2101 // second case on activation, so add a delta from the main thread that
2111 // takes us to the final value. 2102 // takes us to the final value.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 // Impl thread. 2233 // Impl thread.
2243 int num_of_activations_ = 0; 2234 int num_of_activations_ = 0;
2244 int num_of_main_frames_ = 0; 2235 int num_of_main_frames_ = 0;
2245 bool invalidated_on_impl_thread_ = false; 2236 bool invalidated_on_impl_thread_ = false;
2246 CompletionEvent* impl_side_invalidation_event_ = nullptr; 2237 CompletionEvent* impl_side_invalidation_event_ = nullptr;
2247 2238
2248 // Main thread. 2239 // Main thread.
2249 int num_of_deltas_ = 0; 2240 int num_of_deltas_ = 0;
2250 }; 2241 };
2251 2242
2252 MULTI_THREAD_TEST_F(MAYBE_LayerTreeHostScrollTestImplSideInvalidation); 2243 MULTI_THREAD_TEST_F(DISABLED_LayerTreeHostScrollTestImplSideInvalidation);
danakj 2017/03/03 19:53:01 optionally u can just comment out this line instea
2253 2244
2254 } // namespace 2245 } // namespace
2255 } // namespace cc 2246 } // 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