| 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 <queue> | 5 #include <queue> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h" | 10 #include "chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 0) }, | 172 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 0) }, |
| 173 // cancelDialog() | 173 // cancelDialog() |
| 174 { true, true, | 174 { true, true, |
| 175 content::DesktopMediaID(), true }, | 175 content::DesktopMediaID(), true }, |
| 176 }; | 176 }; |
| 177 picker_factory_.SetExpectations(picker_expectations, | 177 picker_factory_.SetExpectations(picker_expectations, |
| 178 arraysize(picker_expectations)); | 178 arraysize(picker_expectations)); |
| 179 ASSERT_TRUE(RunExtensionTest("desktop_capture")) << message_; | 179 ASSERT_TRUE(RunExtensionTest("desktop_capture")) << message_; |
| 180 } | 180 } |
| 181 | 181 |
| 182 IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, Delegation) { | 182 // Does not work with Instant Extended. http://crbug.com/305391. |
| 183 IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, DISABLED_Delegation) { |
| 183 // Initialize test server. | 184 // Initialize test server. |
| 184 base::FilePath test_data; | 185 base::FilePath test_data; |
| 185 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); | 186 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); |
| 186 embedded_test_server()->ServeFilesFromDirectory(test_data.AppendASCII( | 187 embedded_test_server()->ServeFilesFromDirectory(test_data.AppendASCII( |
| 187 "extensions/api_test/desktop_capture_delegate")); | 188 "extensions/api_test/desktop_capture_delegate")); |
| 188 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 189 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 189 host_resolver()->AddRule("*", embedded_test_server()->base_url().host()); | 190 host_resolver()->AddRule("*", embedded_test_server()->base_url().host()); |
| 190 | 191 |
| 191 // Load extension. | 192 // Load extension. |
| 192 base::FilePath extension_path = | 193 base::FilePath extension_path = |
| (...skipping 21 matching lines...) Expand all Loading... |
| 214 "getStream()", &result)); | 215 "getStream()", &result)); |
| 215 EXPECT_TRUE(result); | 216 EXPECT_TRUE(result); |
| 216 | 217 |
| 217 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 218 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
| 218 browser()->tab_strip_model()->GetActiveWebContents(), | 219 browser()->tab_strip_model()->GetActiveWebContents(), |
| 219 "getStreamWithInvalidId()", &result)); | 220 "getStreamWithInvalidId()", &result)); |
| 220 EXPECT_TRUE(result); | 221 EXPECT_TRUE(result); |
| 221 } | 222 } |
| 222 | 223 |
| 223 } // namespace extensions | 224 } // namespace extensions |
| OLD | NEW |