| Index: chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
|
| diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
|
| index 06ae5b293dcda952ff52e9764908d5616ca542c2..aca04db44badced75f10d9ac91cc97b5749586a0 100644
|
| --- a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
|
| +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
|
| @@ -43,6 +43,8 @@ class TabCaptureApiTest : public ExtensionApiTest {
|
| // Specify smallish window size to make testing of tab capture less CPU
|
| // intensive.
|
| command_line->AppendSwitchASCII(::switches::kWindowSize, "300,300");
|
| + // Enable tabCapture.capturePresentation API for testing.
|
| + command_line->AppendSwitch(::switches::kEnableCapturePresentationApi);
|
| }
|
|
|
| void AddExtensionToCommandLineWhitelist() {
|
| @@ -96,6 +98,14 @@ IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, ApiTests) {
|
| ASSERT_TRUE(RunExtensionSubtest("tab_capture", "api_tests.html")) << message_;
|
| }
|
|
|
| +// Tests that there is a maximum limitation to the number of simultaneous
|
| +// offscreen presentation sessions.
|
| +IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MaxOffscreenPresentations) {
|
| + AddExtensionToCommandLineWhitelist();
|
| + ASSERT_TRUE(RunExtensionSubtest("tab_capture", "max_presentations.html"))
|
| + << message_;
|
| +}
|
| +
|
| // Tests that tab capture video frames can be received in a VIDEO element.
|
| IN_PROC_BROWSER_TEST_F(TabCaptureApiPixelTest, EndToEndWithoutRemoting) {
|
| if (IsTooIntensiveForThisPlatform()) {
|
| @@ -123,6 +133,19 @@ IN_PROC_BROWSER_TEST_F(TabCaptureApiPixelTest, EndToEndThroughWebRTC) {
|
| << message_;
|
| }
|
|
|
| +// Tests that tab capture video frames can be received in a VIDEO element from
|
| +// an offscreen presentation tab.
|
| +IN_PROC_BROWSER_TEST_F(TabCaptureApiPixelTest, EndToEndOffscreenPresentation) {
|
| + if (IsTooIntensiveForThisPlatform()) {
|
| + LOG(WARNING) << "Skipping this CPU-intensive test on this platform/build.";
|
| + return;
|
| + }
|
| + AddExtensionToCommandLineWhitelist();
|
| + ASSERT_TRUE(RunExtensionSubtest(
|
| + "tab_capture", "presentation.html?colorDeviation=10"))
|
| + << message_;
|
| +}
|
| +
|
| // http://crbug.com/177163
|
| #if defined(OS_WIN) && !defined(NDEBUG)
|
| #define MAYBE_GetUserMediaTest DISABLED_GetUserMediaTest
|
|
|