OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 #include "chrome/common/chrome_version_info.h" |
| 7 #include "chrome/common/extensions/feature_switch.h" |
| 8 #include "chrome/common/extensions/features/feature.h" |
| 9 #include "content/public/common/content_switches.h" |
| 10 |
| 11 namespace chrome { |
| 12 |
| 13 namespace { |
| 14 |
| 15 class TabCaptureApiTest : public ExtensionApiTest { |
| 16 public: |
| 17 TabCaptureApiTest() : current_channel_(VersionInfo::CHANNEL_UNKNOWN) {} |
| 18 |
| 19 // We need to enable this content flag, otherwise the tab stream gets blocked. |
| 20 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 21 ExtensionApiTest::SetUpCommandLine(command_line); |
| 22 command_line->AppendSwitch(switches::kEnableTabCapture); |
| 23 } |
| 24 |
| 25 private: |
| 26 extensions::Feature::ScopedCurrentChannel current_channel_; |
| 27 }; |
| 28 |
| 29 } // namespace |
| 30 |
| 31 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, TabCapture) { |
| 32 extensions::FeatureSwitch::ScopedOverride tab_capture( |
| 33 extensions::FeatureSwitch::tab_capture(), true); |
| 34 ASSERT_TRUE(RunExtensionTest("tab_capture/experimental")) << message_; |
| 35 } |
| 36 |
| 37 } // namespace chrome |
OLD | NEW |