| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "content/browser/webrtc/webrtc_content_browsertest_base.h" | 7 #include "content/browser/webrtc/webrtc_content_browsertest_base.h" |
| 8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
| 9 #include "media/base/test_data_util.h" | 9 #include "media/base/test_data_util.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, | 81 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
| 82 VerifyCanvasCaptureFrames) { | 82 VerifyCanvasCaptureFrames) { |
| 83 MakeTypicalCall("testCanvasCapture(draw2d);", kCanvasCaptureTestHtmlFile); | 83 MakeTypicalCall("testCanvasCapture(draw2d);", kCanvasCaptureTestHtmlFile); |
| 84 } | 84 } |
| 85 | 85 |
| 86 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, | 86 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
| 87 VerifyCanvasCaptureWebGLFrames) { | 87 VerifyCanvasCaptureWebGLFrames) { |
| 88 MakeTypicalCall("testCanvasCapture(drawWebGL);", kCanvasCaptureTestHtmlFile); | 88 MakeTypicalCall("testCanvasCapture(drawWebGL);", kCanvasCaptureTestHtmlFile); |
| 89 } | 89 } |
| 90 | 90 |
| 91 #if defined(OS_MACOSX) |
| 92 // This test causes GL related issues in Mac: https://crbug.com/695452. |
| 93 #define MAYBE_VerifyCanvasCaptureOffscreenCanvasCommitFrames \ |
| 94 DISABLED_VerifyCanvasCaptureOffscreenCanvasCommitFrames |
| 95 #else |
| 96 #define MAYBE_VerifyCanvasCaptureOffscreenCanvasCommitFrames \ |
| 97 VerifyCanvasCaptureOffscreenCanvasCommitFrames |
| 98 #endif |
| 99 |
| 91 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, | 100 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
| 92 VerifyCanvasCaptureOffscreenCanvasCommitFrames) { | 101 MAYBE_VerifyCanvasCaptureOffscreenCanvasCommitFrames) { |
| 93 MakeTypicalCall("testCanvasCapture(drawOffscreenCanvasCommit);", | 102 MakeTypicalCall("testCanvasCapture(drawOffscreenCanvasCommit);", |
| 94 kCanvasCaptureTestHtmlFile); | 103 kCanvasCaptureTestHtmlFile); |
| 95 } | 104 } |
| 96 | 105 |
| 97 IN_PROC_BROWSER_TEST_P(WebRtcCaptureFromElementBrowserTest, | 106 IN_PROC_BROWSER_TEST_P(WebRtcCaptureFromElementBrowserTest, |
| 98 MAYBE_CaptureFromMediaElement) { | 107 MAYBE_CaptureFromMediaElement) { |
| 99 #if defined(OS_ANDROID) | 108 #if defined(OS_ANDROID) |
| 100 // TODO(mcasas): flaky on Lollipop Low-End devices, investigate and reconnect | 109 // TODO(mcasas): flaky on Lollipop Low-End devices, investigate and reconnect |
| 101 // https://crbug.com/626299 | 110 // https://crbug.com/626299 |
| 102 if (base::SysInfo::IsLowEndDevice() && | 111 if (base::SysInfo::IsLowEndDevice() && |
| 103 base::android::BuildInfo::GetInstance()->sdk_int() < | 112 base::android::BuildInfo::GetInstance()->sdk_int() < |
| 104 base::android::SDK_VERSION_MARSHMALLOW) { | 113 base::android::SDK_VERSION_MARSHMALLOW) { |
| 105 return; | 114 return; |
| 106 } | 115 } |
| 107 #endif | 116 #endif |
| 108 | 117 |
| 109 MakeTypicalCall( | 118 MakeTypicalCall( |
| 110 base::StringPrintf("testCaptureFromMediaElement(\"%s\", %d, %d, %d);", | 119 base::StringPrintf("testCaptureFromMediaElement(\"%s\", %d, %d, %d);", |
| 111 GetParam().filename.c_str(), | 120 GetParam().filename.c_str(), |
| 112 GetParam().has_video, | 121 GetParam().has_video, |
| 113 GetParam().has_audio, | 122 GetParam().has_audio, |
| 114 GetParam().use_audio_tag), | 123 GetParam().use_audio_tag), |
| 115 kVideoAudioHtmlFile); | 124 kVideoAudioHtmlFile); |
| 116 } | 125 } |
| 117 | 126 |
| 118 INSTANTIATE_TEST_CASE_P(, | 127 INSTANTIATE_TEST_CASE_P(, |
| 119 WebRtcCaptureFromElementBrowserTest, | 128 WebRtcCaptureFromElementBrowserTest, |
| 120 testing::ValuesIn(kFileAndTypeParameters)); | 129 testing::ValuesIn(kFileAndTypeParameters)); |
| 121 } // namespace content | 130 } // namespace content |
| OLD | NEW |