| 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 "core/html/HTMLVideoElement.h" | 5 #include "core/html/HTMLVideoElement.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "core/dom/Fullscreen.h" | 9 #include "core/dom/Fullscreen.h" |
| 10 #include "core/dom/UserGestureIndicator.h" | 10 #include "core/dom/UserGestureIndicator.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 HTMLVideoElement* VideoElement() { | 50 HTMLVideoElement* VideoElement() { |
| 51 return toHTMLVideoElement(GetDocument().QuerySelector("video")); | 51 return toHTMLVideoElement(GetDocument().QuerySelector("video")); |
| 52 } | 52 } |
| 53 | 53 |
| 54 HTMLDivElement* DivElement() { | 54 HTMLDivElement* DivElement() { |
| 55 return toHTMLDivElement(GetDocument().QuerySelector("div")); | 55 return toHTMLDivElement(GetDocument().QuerySelector("div")); |
| 56 } | 56 } |
| 57 | 57 |
| 58 Element* FullscreenElement() { | 58 Element* FullscreenElement() { |
| 59 return Fullscreen::CurrentFullScreenElementFrom(GetDocument()); | 59 return Fullscreen::FullscreenElementFrom(GetDocument()); |
| 60 } | 60 } |
| 61 | 61 |
| 62 MockChromeClient& GetMockChromeClient() { return *chrome_client_; } | 62 MockChromeClient& GetMockChromeClient() { return *chrome_client_; } |
| 63 | 63 |
| 64 void SimulateDidEnterFullscreen() { | 64 void SimulateDidEnterFullscreen() { |
| 65 Fullscreen::FromIfExists(GetDocument())->DidEnterFullscreen(); | 65 Fullscreen::FromIfExists(GetDocument())->DidEnterFullscreen(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void SimulateDidExitFullscreen() { | 68 void SimulateDidExitFullscreen() { |
| 69 Fullscreen::FromIfExists(GetDocument())->DidExitFullscreen(); | 69 Fullscreen::FromIfExists(GetDocument())->DidExitFullscreen(); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 UserGestureToken::Create(&GetDocument())); | 318 UserGestureToken::Create(&GetDocument())); |
| 319 Fullscreen::RequestFullscreen(*DivElement()); | 319 Fullscreen::RequestFullscreen(*DivElement()); |
| 320 SimulateDidEnterFullscreen(); | 320 SimulateDidEnterFullscreen(); |
| 321 EXPECT_EQ(FullscreenElement(), DivElement()); | 321 EXPECT_EQ(FullscreenElement(), DivElement()); |
| 322 | 322 |
| 323 SimulateBecamePersistentVideo(true); | 323 SimulateBecamePersistentVideo(true); |
| 324 EXPECT_FALSE(GetDocument().body()->ContainsPersistentVideo()); | 324 EXPECT_FALSE(GetDocument().body()->ContainsPersistentVideo()); |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace blink | 327 } // namespace blink |
| OLD | NEW |