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

Unified Diff: chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc

Issue 11038021: Implement Chrome Extension TabCapture API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698