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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLVideoElementPersistentTest.cpp

Issue 2855843002: Reland "Sync requestFullscreen() and exitFullscreen() algorithms with the spec" (Closed)
Patch Set: Reland "Sync requestFullscreen() and exitFullscreen() algorithms with the spec" Created 3 years, 6 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698