| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..459fd327ad1750afb17ced450afdaba073d4a6fe
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/extensions/extension_apitest.h"
|
| +#include "chrome/common/chrome_version_info.h"
|
| +#include "chrome/common/extensions/feature_switch.h"
|
| +#include "chrome/common/extensions/features/feature.h"
|
| +#include "content/public/common/content_switches.h"
|
| +
|
| +namespace chrome {
|
| +
|
| +namespace {
|
| +
|
| +class TabCaptureApiTest : public ExtensionApiTest {
|
| + public:
|
| + TabCaptureApiTest() : current_channel_(VersionInfo::CHANNEL_UNKNOWN) {}
|
| +
|
| + // We need to enable this content flag, otherwise the tab stream gets blocked.
|
| + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
|
| + ExtensionApiTest::SetUpCommandLine(command_line);
|
| + command_line->AppendSwitch(switches::kEnableTabCapture);
|
| + }
|
| +
|
| + private:
|
| + extensions::Feature::ScopedCurrentChannel current_channel_;
|
| +};
|
| +
|
| +} // namespace
|
| +
|
| +IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, TabCapture) {
|
| + extensions::FeatureSwitch::ScopedOverride tab_capture(
|
| + extensions::FeatureSwitch::tab_capture(), true);
|
| + ASSERT_TRUE(RunExtensionTest("tab_capture/experimental")) << message_;
|
| +}
|
| +
|
| +} // namespace chrome
|
|
|