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

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

Issue 2178243002: Make ExceptionState parameter of ContainerNode::querySelector() as an optional parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-26T10:56:52 Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/shadow/MediaControls.h" 5 #include "core/html/shadow/MediaControls.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/css/StylePropertySet.h" 8 #include "core/css/StylePropertySet.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/ElementTraversal.h" 10 #include "core/dom/ElementTraversal.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } // namespace 55 } // namespace
56 56
57 class MediaControlsTest : public testing::Test { 57 class MediaControlsTest : public testing::Test {
58 protected: 58 protected:
59 virtual void SetUp() 59 virtual void SetUp()
60 { 60 {
61 m_pageHolder = DummyPageHolder::create(IntSize(800, 600)); 61 m_pageHolder = DummyPageHolder::create(IntSize(800, 600));
62 Document& document = this->document(); 62 Document& document = this->document();
63 63
64 document.write("<video>"); 64 document.write("<video>");
65 HTMLVideoElement& video = toHTMLVideoElement(*document.querySelector("vi deo", ASSERT_NO_EXCEPTION)); 65 HTMLVideoElement& video = toHTMLVideoElement(*document.querySelector("vi deo"));
66 m_mediaControls = video.mediaControls(); 66 m_mediaControls = video.mediaControls();
67 67
68 // If scripts are not enabled, controls will always be shown. 68 // If scripts are not enabled, controls will always be shown.
69 m_pageHolder->frame().settings()->setScriptEnabled(true); 69 m_pageHolder->frame().settings()->setScriptEnabled(true);
70 } 70 }
71 71
72 void simulateRouteAvailabe() 72 void simulateRouteAvailabe()
73 { 73 {
74 m_mediaControls->mediaElement().remoteRouteAvailabilityChanged(true); 74 m_mediaControls->mediaElement().remoteRouteAvailabilityChanged(true);
75 } 75 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 mediaControls().mediaElement().setBooleanAttribute(HTMLNames::disableremotep laybackAttr, true); 188 mediaControls().mediaElement().setBooleanAttribute(HTMLNames::disableremotep laybackAttr, true);
189 simulateRouteAvailabe(); 189 simulateRouteAvailabe();
190 ASSERT_FALSE(isElementVisible(*castOverlayButton)); 190 ASSERT_FALSE(isElementVisible(*castOverlayButton));
191 191
192 mediaControls().mediaElement().setBooleanAttribute(HTMLNames::disableremotep laybackAttr, false); 192 mediaControls().mediaElement().setBooleanAttribute(HTMLNames::disableremotep laybackAttr, false);
193 mediaControls().reset(); 193 mediaControls().reset();
194 ASSERT_TRUE(isElementVisible(*castOverlayButton)); 194 ASSERT_TRUE(isElementVisible(*castOverlayButton));
195 } 195 }
196 196
197 } // namespace blink 197 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698