OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "chrome/browser/apps/app_browsertest_util.h" | 7 #include "chrome/browser/apps/app_browsertest_util.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" | 9 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" |
10 #include "chrome/browser/extensions/component_loader.h" | 10 #include "chrome/browser/extensions/component_loader.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 class FeedbackTest : public ExtensionBrowserTest { | 37 class FeedbackTest : public ExtensionBrowserTest { |
38 public: | 38 public: |
39 void SetUp() override { | 39 void SetUp() override { |
40 extensions::ComponentLoader::EnableBackgroundExtensionsForTesting(); | 40 extensions::ComponentLoader::EnableBackgroundExtensionsForTesting(); |
41 InProcessBrowserTest::SetUp(); | 41 InProcessBrowserTest::SetUp(); |
42 } | 42 } |
43 | 43 |
44 void SetUpCommandLine(base::CommandLine* command_line) override { | 44 void SetUpCommandLine(base::CommandLine* command_line) override { |
45 command_line->AppendSwitch(::switches::kEnableUserMediaScreenCapturing); | 45 command_line->AppendSwitch(::switches::kEnableUserMediaScreenCapturing); |
46 InProcessBrowserTest::SetUpCommandLine(command_line); | |
47 } | 46 } |
48 | 47 |
49 protected: | 48 protected: |
50 bool IsFeedbackAppAvailable() { | 49 bool IsFeedbackAppAvailable() { |
51 return extensions::EventRouter::Get(browser()->profile()) | 50 return extensions::EventRouter::Get(browser()->profile()) |
52 ->ExtensionHasEventListener( | 51 ->ExtensionHasEventListener( |
53 extension_misc::kFeedbackExtensionId, | 52 extension_misc::kFeedbackExtensionId, |
54 extensions::api::feedback_private::OnFeedbackRequested::kEventName); | 53 extensions::api::feedback_private::OnFeedbackRequested::kEventName); |
55 } | 54 } |
56 | 55 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 " }" | 172 " }" |
174 " }" | 173 " }" |
175 " return false;" | 174 " return false;" |
176 " })()));", | 175 " })()));", |
177 &bool_result)); | 176 &bool_result)); |
178 | 177 |
179 EXPECT_TRUE(bool_result); | 178 EXPECT_TRUE(bool_result); |
180 } | 179 } |
181 | 180 |
182 } // namespace extensions | 181 } // namespace extensions |
OLD | NEW |