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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_browsertest.cc

Issue 137403005: Remove some code inside USE_AURA and OS_WIN ifdefs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop_proxy.h" 6 #include "base/message_loop/message_loop_proxy.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/gpu/compositor_util.h" 9 #include "content/browser/gpu/compositor_util.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 public: 222 public:
223 explicit CompositingRenderWidgetHostViewBrowserTest() 223 explicit CompositingRenderWidgetHostViewBrowserTest()
224 : compositing_mode_(GetParam()) {} 224 : compositing_mode_(GetParam()) {}
225 225
226 virtual void SetUp() OVERRIDE { 226 virtual void SetUp() OVERRIDE {
227 if (compositing_mode_ == SOFTWARE_COMPOSITING) { 227 if (compositing_mode_ == SOFTWARE_COMPOSITING) {
228 UseSoftwareCompositing(); 228 UseSoftwareCompositing();
229 } else { 229 } else {
230 // We expect real pixel output for these tests. 230 // We expect real pixel output for these tests.
231 UseRealGLContexts(); 231 UseRealGLContexts();
232
233 #if defined(OS_WIN) && !defined(USE_AURA)
234 // On legacy windows, these tests need real GL bindings to pass.
235 UseRealGLBindings();
236 #endif
237 } 232 }
238 233
239 RenderWidgetHostViewBrowserTest::SetUp(); 234 RenderWidgetHostViewBrowserTest::SetUp();
240 } 235 }
241 236
242 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 237 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
243 // Note: Not appending kForceCompositingMode switch here, since not all bots 238 // Note: Not appending kForceCompositingMode switch here, since not all bots
244 // support compositing. Some bots will run with compositing on, and others 239 // support compositing. Some bots will run with compositing on, and others
245 // won't. Therefore, the call to SetUpSourceSurface() later on will detect 240 // won't. Therefore, the call to SetUpSourceSurface() later on will detect
246 // whether compositing mode is actually on or not. If not, the tests will 241 // whether compositing mode is actually on or not. If not, the tests will
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 GetRenderWidgetHostViewPort()->AcceleratedSurfaceRelease(); 387 GetRenderWidgetHostViewPort()->AcceleratedSurfaceRelease();
393 run_loop.Run(); 388 run_loop.Run();
394 389
395 EXPECT_EQ(1, callback_invoke_count()); 390 EXPECT_EQ(1, callback_invoke_count());
396 } 391 }
397 392
398 // Tests that the callback passed to CopyFromCompositingSurfaceToVideoFrame is 393 // Tests that the callback passed to CopyFromCompositingSurfaceToVideoFrame is
399 // always called, even when the RenderWidgetHost is deleting in the middle of 394 // always called, even when the RenderWidgetHost is deleting in the middle of
400 // an async copy. 395 // an async copy.
401 // 396 //
402 // Test is flaky on Win Aura. http://crbug.com/276783 397 // Test is flaky on Win. http://crbug.com/276783
403 #if (defined(OS_WIN) && defined(USE_AURA)) || \ 398 #if defined(OS_WIN) || (defined(OS_CHROMEOS) && !defined(NDEBUG))
404 (defined(OS_CHROMEOS) && !defined(NDEBUG))
405 #define MAYBE_CopyFromCompositingSurface_CallbackDespiteDelete \ 399 #define MAYBE_CopyFromCompositingSurface_CallbackDespiteDelete \
406 DISABLED_CopyFromCompositingSurface_CallbackDespiteDelete 400 DISABLED_CopyFromCompositingSurface_CallbackDespiteDelete
407 #else 401 #else
408 #define MAYBE_CopyFromCompositingSurface_CallbackDespiteDelete \ 402 #define MAYBE_CopyFromCompositingSurface_CallbackDespiteDelete \
409 CopyFromCompositingSurface_CallbackDespiteDelete 403 CopyFromCompositingSurface_CallbackDespiteDelete
410 #endif 404 #endif
411 IN_PROC_BROWSER_TEST_P(CompositingRenderWidgetHostViewBrowserTest, 405 IN_PROC_BROWSER_TEST_P(CompositingRenderWidgetHostViewBrowserTest,
412 MAYBE_CopyFromCompositingSurface_CallbackDespiteDelete) { 406 MAYBE_CopyFromCompositingSurface_CallbackDespiteDelete) {
413 SET_UP_SURFACE_OR_PASS_TEST(NULL); 407 SET_UP_SURFACE_OR_PASS_TEST(NULL);
414 RenderWidgetHostViewPort* const view = GetRenderWidgetHostViewPort(); 408 RenderWidgetHostViewPort* const view = GetRenderWidgetHostViewPort();
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 CompositingRenderWidgetHostViewBrowserTestTabCapture, 944 CompositingRenderWidgetHostViewBrowserTestTabCapture,
951 testing::ValuesIn(kAllCompositingModes)); 945 testing::ValuesIn(kAllCompositingModes));
952 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, 946 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing,
953 CompositingRenderWidgetHostViewTabCaptureHighDPI, 947 CompositingRenderWidgetHostViewTabCaptureHighDPI,
954 testing::ValuesIn(kAllCompositingModes)); 948 testing::ValuesIn(kAllCompositingModes));
955 949
956 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 950 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
957 951
958 } // namespace 952 } // namespace
959 } // namespace content 953 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698