| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/frame_host/render_widget_host_view_guest.h" | 5 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #if defined(OS_ANDROID) | 107 #if defined(OS_ANDROID) |
| 108 MockGpuChannelEstablishFactory gpu_channel_factory_; | 108 MockGpuChannelEstablishFactory gpu_channel_factory_; |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuestTest); | 112 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuestTest); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace | 115 } // namespace |
| 116 | 116 |
| 117 TEST_F(RenderWidgetHostViewGuestTest, VisibilityTest) { | 117 // Fails on Windows, crbug.com/695375. |
| 118 #if defined(OS_WIN) |
| 119 #define MAYBE_VisibilityTest DISABLED_VisibilityTest |
| 120 #else |
| 121 #define MAYBE_VisibilityTest VisibilityTest |
| 122 #endif |
| 123 TEST_F(RenderWidgetHostViewGuestTest, MAYBE_VisibilityTest) { |
| 118 view_->Show(); | 124 view_->Show(); |
| 119 ASSERT_TRUE(view_->IsShowing()); | 125 ASSERT_TRUE(view_->IsShowing()); |
| 120 | 126 |
| 121 view_->Hide(); | 127 view_->Hide(); |
| 122 ASSERT_FALSE(view_->IsShowing()); | 128 ASSERT_FALSE(view_->IsShowing()); |
| 123 } | 129 } |
| 124 | 130 |
| 125 class TestBrowserPluginGuest : public BrowserPluginGuest { | 131 class TestBrowserPluginGuest : public BrowserPluginGuest { |
| 126 public: | 132 public: |
| 127 TestBrowserPluginGuest(WebContentsImpl* web_contents, | 133 TestBrowserPluginGuest(WebContentsImpl* web_contents, |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 309 |
| 304 browser_plugin_guest_->set_attached(false); | 310 browser_plugin_guest_->set_attached(false); |
| 305 browser_plugin_guest_->ResetTestData(); | 311 browser_plugin_guest_->ResetTestData(); |
| 306 | 312 |
| 307 view_->OnSwapCompositorFrame( | 313 view_->OnSwapCompositorFrame( |
| 308 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); | 314 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); |
| 309 EXPECT_FALSE(GetSurfaceId().is_valid()); | 315 EXPECT_FALSE(GetSurfaceId().is_valid()); |
| 310 } | 316 } |
| 311 | 317 |
| 312 } // namespace content | 318 } // namespace content |
| OLD | NEW |