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

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc

Issue 11198044: Make tab capture media stream requests verify that the request came from extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/common/chrome_version_info.h" 6 #include "chrome/common/chrome_version_info.h"
7 #include "chrome/common/extensions/feature_switch.h" 7 #include "chrome/common/extensions/feature_switch.h"
8 #include "chrome/common/extensions/features/feature.h" 8 #include "chrome/common/extensions/features/feature.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 10
(...skipping 15 matching lines...) Expand all
26 #define MAYBE_TabCapture DISABLED_TabCapture 26 #define MAYBE_TabCapture DISABLED_TabCapture
27 #else 27 #else
28 #define MAYBE_TabCapture TabCapture 28 #define MAYBE_TabCapture TabCapture
29 #endif // defined (OS_WIN) 29 #endif // defined (OS_WIN)
30 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_TabCapture) { 30 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_TabCapture) {
31 extensions::FeatureSwitch::ScopedOverride tab_capture( 31 extensions::FeatureSwitch::ScopedOverride tab_capture(
32 extensions::FeatureSwitch::tab_capture(), true); 32 extensions::FeatureSwitch::tab_capture(), true);
33 ASSERT_TRUE(RunExtensionTest("tab_capture/experimental")) << message_; 33 ASSERT_TRUE(RunExtensionTest("tab_capture/experimental")) << message_;
34 } 34 }
35 35
36 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, TabCapturePermissionsTestFlagOn) {
37 extensions::FeatureSwitch::ScopedOverride tab_capture(
38 extensions::FeatureSwitch::tab_capture(), true);
39 ASSERT_TRUE(RunExtensionTest("tab_capture/permissions")) << message_;
40 }
41
42 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, TabCapturePermissionsTestFlagOff) {
43 extensions::FeatureSwitch::ScopedOverride tab_capture(
44 extensions::FeatureSwitch::tab_capture(), false);
45 ASSERT_TRUE(RunExtensionTest("tab_capture/permissions")) << message_;
46 }
47
36 } // namespace chrome 48 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698