| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/webaudio/BaseAudioContext.h" | 5 #include "modules/webaudio/BaseAudioContext.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/DocumentUserGestureToken.h" | 8 #include "core/dom/DocumentUserGestureToken.h" |
| 9 #include "core/frame/FrameOwner.h" | 9 #include "core/frame/FrameOwner.h" |
| 10 #include "core/frame/FrameTypes.h" | 10 #include "core/frame/FrameTypes.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } | 93 } |
| 94 | 94 |
| 95 void TearDown() override { | 95 void TearDown() override { |
| 96 if (m_childFrame) | 96 if (m_childFrame) |
| 97 m_childFrame->detach(FrameDetachType::Remove); | 97 m_childFrame->detach(FrameDetachType::Remove); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void createChildFrame() { | 100 void createChildFrame() { |
| 101 m_childFrame = LocalFrame::create( | 101 m_childFrame = LocalFrame::create( |
| 102 MockCrossOriginLocalFrameClient::create(document().frame()), | 102 MockCrossOriginLocalFrameClient::create(document().frame()), |
| 103 document().frame()->page(), m_dummyFrameOwner.get()); | 103 *document().frame()->page(), m_dummyFrameOwner.get()); |
| 104 m_childFrame->setView(FrameView::create(*m_childFrame, IntSize(500, 500))); | 104 m_childFrame->setView(FrameView::create(*m_childFrame, IntSize(500, 500))); |
| 105 m_childFrame->init(); | 105 m_childFrame->init(); |
| 106 | 106 |
| 107 childDocument().updateSecurityOrigin( | 107 childDocument().updateSecurityOrigin( |
| 108 SecurityOrigin::create("https", "cross-origin.com", 80)); | 108 SecurityOrigin::create("https", "cross-origin.com", 80)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 Document& document() { return m_dummyPageHolder->document(); } | 111 Document& document() { return m_dummyPageHolder->document(); } |
| 112 | 112 |
| 113 Document& childDocument() { return *m_childFrame->document(); } | 113 Document& childDocument() { return *m_childFrame->document(); } |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 audioContext->resumeContext(getScriptStateFrom(childDocument())); | 283 audioContext->resumeContext(getScriptStateFrom(childDocument())); |
| 284 rejectPendingResolvers(audioContext); | 284 rejectPendingResolvers(audioContext); |
| 285 recordAutoplayStatus(audioContext); | 285 recordAutoplayStatus(audioContext); |
| 286 | 286 |
| 287 histogramTester.expectBucketCount(kCrossOriginMetric, | 287 histogramTester.expectBucketCount(kCrossOriginMetric, |
| 288 AutoplayStatus::AutoplayStatusSucceeded, 1); | 288 AutoplayStatus::AutoplayStatusSucceeded, 1); |
| 289 histogramTester.expectTotalCount(kCrossOriginMetric, 1); | 289 histogramTester.expectTotalCount(kCrossOriginMetric, 1); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace blink | 292 } // namespace blink |
| OLD | NEW |