| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 // Test that layouts are ignored before the client is notified about a surface. | 207 // Test that layouts are ignored before the client is notified about a surface. |
| 208 TEST_F(MojoAndroidOverlayTest, LayoutBeforeSurfaceIsIgnored) { | 208 TEST_F(MojoAndroidOverlayTest, LayoutBeforeSurfaceIsIgnored) { |
| 209 CreateAndInitializeOverlay(); | 209 CreateAndInitializeOverlay(); |
| 210 | 210 |
| 211 gfx::Rect new_layout(5, 6, 7, 8); | 211 gfx::Rect new_layout(5, 6, 7, 8); |
| 212 EXPECT_CALL(mock_overlay_, ScheduleLayout(_)).Times(0); | 212 EXPECT_CALL(mock_overlay_, ScheduleLayout(_)).Times(0); |
| 213 overlay_client_->ScheduleLayout(new_layout); | 213 overlay_client_->ScheduleLayout(new_layout); |
| 214 } | 214 } |
| 215 | 215 |
| 216 // Test |secure| makes it to the mojo config when it is true |
| 217 TEST_F(MojoAndroidOverlayTest, SecureFlagIsSentViaMojoWhenTrue) { |
| 218 config_.secure = true; |
| 219 CreateOverlay(); |
| 220 ASSERT_TRUE(mock_provider_.config_->secure); |
| 221 } |
| 222 |
| 223 // Test |secure| makes it to the mojo config when it is false |
| 224 TEST_F(MojoAndroidOverlayTest, SecureFlagIsSentViaMojoWhenFalse) { |
| 225 config_.secure = false; |
| 226 CreateOverlay(); |
| 227 ASSERT_FALSE(mock_provider_.config_->secure); |
| 228 } |
| 229 |
| 216 } // namespace media | 230 } // namespace media |
| OLD | NEW |