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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 DISALLOW_COPY_AND_ASSIGN(WebRtcCaptureFromElementBrowserTest); | 72 DISALLOW_COPY_AND_ASSIGN(WebRtcCaptureFromElementBrowserTest); |
73 }; | 73 }; |
74 | 74 |
75 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, | 75 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
76 VerifyCanvasCaptureColor) { | 76 VerifyCanvasCaptureColor) { |
77 MakeTypicalCall("testCanvasCaptureColors();", | 77 MakeTypicalCall("testCanvasCaptureColors();", |
78 kCanvasCaptureColorTestHtmlFile); | 78 kCanvasCaptureColorTestHtmlFile); |
79 } | 79 } |
80 | 80 |
81 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, | 81 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
82 VerifyCanvasCaptureFrames) { | 82 VerifyCanvasCapture2DFrames) { |
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 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, | 91 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
92 VerifyCanvasCaptureOffscreenCanvasCommitFrames) { | 92 VerifyCanvasCaptureOffscreenCanvasCommitFrames) { |
93 MakeTypicalCall("testCanvasCapture(drawOffscreenCanvasCommit);", | 93 MakeTypicalCall("testCanvasCapture(drawOffscreenCanvasCommit);", |
94 kCanvasCaptureTestHtmlFile); | 94 kCanvasCaptureTestHtmlFile); |
95 } | 95 } |
96 | 96 |
| 97 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
| 98 VerifyCanvasCaptureBitmapRendererFrames) { |
| 99 MakeTypicalCall("testCanvasCapture(drawBitmapRenderer);", |
| 100 kCanvasCaptureTestHtmlFile); |
| 101 } |
| 102 |
97 IN_PROC_BROWSER_TEST_P(WebRtcCaptureFromElementBrowserTest, | 103 IN_PROC_BROWSER_TEST_P(WebRtcCaptureFromElementBrowserTest, |
98 MAYBE_CaptureFromMediaElement) { | 104 MAYBE_CaptureFromMediaElement) { |
99 #if defined(OS_ANDROID) | 105 #if defined(OS_ANDROID) |
100 // TODO(mcasas): flaky on Lollipop Low-End devices, investigate and reconnect | 106 // TODO(mcasas): flaky on Lollipop Low-End devices, investigate and reconnect |
101 // https://crbug.com/626299 | 107 // https://crbug.com/626299 |
102 if (base::SysInfo::IsLowEndDevice() && | 108 if (base::SysInfo::IsLowEndDevice() && |
103 base::android::BuildInfo::GetInstance()->sdk_int() < | 109 base::android::BuildInfo::GetInstance()->sdk_int() < |
104 base::android::SDK_VERSION_MARSHMALLOW) { | 110 base::android::SDK_VERSION_MARSHMALLOW) { |
105 return; | 111 return; |
106 } | 112 } |
107 #endif | 113 #endif |
108 | 114 |
109 MakeTypicalCall( | 115 MakeTypicalCall( |
110 base::StringPrintf("testCaptureFromMediaElement(\"%s\", %d, %d, %d);", | 116 base::StringPrintf("testCaptureFromMediaElement(\"%s\", %d, %d, %d);", |
111 GetParam().filename.c_str(), | 117 GetParam().filename.c_str(), |
112 GetParam().has_video, | 118 GetParam().has_video, |
113 GetParam().has_audio, | 119 GetParam().has_audio, |
114 GetParam().use_audio_tag), | 120 GetParam().use_audio_tag), |
115 kVideoAudioHtmlFile); | 121 kVideoAudioHtmlFile); |
116 } | 122 } |
117 | 123 |
118 INSTANTIATE_TEST_CASE_P(, | 124 INSTANTIATE_TEST_CASE_P(, |
119 WebRtcCaptureFromElementBrowserTest, | 125 WebRtcCaptureFromElementBrowserTest, |
120 testing::ValuesIn(kFileAndTypeParameters)); | 126 testing::ValuesIn(kFileAndTypeParameters)); |
121 } // namespace content | 127 } // namespace content |
OLD | NEW |