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

Side by Side Diff: content/browser/webrtc/webrtc_capture_from_element_browsertest.cc

Issue 2797543002: Fix unreliable MediaStream capture from WebGL canvases (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | content/test/data/media/canvas_capture_color.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Allow experimental canvas features. 66 // Allow experimental canvas features.
67 base::CommandLine::ForCurrentProcess()->AppendSwitch( 67 base::CommandLine::ForCurrentProcess()->AppendSwitch(
68 switches::kEnableExperimentalCanvasFeatures); 68 switches::kEnableExperimentalCanvasFeatures);
69 } 69 }
70 70
71 private: 71 private:
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 VerifyCanvas2DCaptureColor) {
77 MakeTypicalCall("testCanvasCaptureColors();", 77 MakeTypicalCall("testCanvas2DCaptureColors();",
78 kCanvasCaptureColorTestHtmlFile); 78 kCanvasCaptureColorTestHtmlFile);
79 } 79 }
80 80
81 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, 81 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest,
82 VerifyCanvasWebGLCaptureColor) {
83 #if !defined(OS_MACOSX)
84 // TODO(crbug.com/706009): Make this test pass on mac. Behavior is not buggy
85 // (verified manually) on mac, but for some reason this test fails on the mac
86 // bot.
87 MakeTypicalCall("testCanvasWebGLCaptureColors();",
88 kCanvasCaptureColorTestHtmlFile);
89 #endif
90 }
91
92 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest,
82 VerifyCanvasCapture2DFrames) { 93 VerifyCanvasCapture2DFrames) {
83 MakeTypicalCall("testCanvasCapture(draw2d);", kCanvasCaptureTestHtmlFile); 94 MakeTypicalCall("testCanvasCapture(draw2d);", kCanvasCaptureTestHtmlFile);
84 } 95 }
85 96
86 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, 97 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest,
87 VerifyCanvasCaptureWebGLFrames) { 98 VerifyCanvasCaptureWebGLFrames) {
88 MakeTypicalCall("testCanvasCapture(drawWebGL);", kCanvasCaptureTestHtmlFile); 99 MakeTypicalCall("testCanvasCapture(drawWebGL);", kCanvasCaptureTestHtmlFile);
89 } 100 }
90 101
91 // This test causes GL related issues on Win and Mac: https://crbug.com/695452. 102 // This test causes GL related issues on Win and Mac: https://crbug.com/695452.
(...skipping 28 matching lines...) Expand all
120 GetParam().has_video, 131 GetParam().has_video,
121 GetParam().has_audio, 132 GetParam().has_audio,
122 GetParam().use_audio_tag), 133 GetParam().use_audio_tag),
123 kVideoAudioHtmlFile); 134 kVideoAudioHtmlFile);
124 } 135 }
125 136
126 INSTANTIATE_TEST_CASE_P(, 137 INSTANTIATE_TEST_CASE_P(,
127 WebRtcCaptureFromElementBrowserTest, 138 WebRtcCaptureFromElementBrowserTest,
128 testing::ValuesIn(kFileAndTypeParameters)); 139 testing::ValuesIn(kFileAndTypeParameters));
129 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/media/canvas_capture_color.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698