| 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/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 DesktopCaptureChooseDesktopMediaFunction:: | 125 DesktopCaptureChooseDesktopMediaFunction:: |
| 126 SetPickerFactoryForTests(&picker_factory_); | 126 SetPickerFactoryForTests(&picker_factory_); |
| 127 } | 127 } |
| 128 ~DesktopCaptureApiTest() override { | 128 ~DesktopCaptureApiTest() override { |
| 129 DesktopCaptureChooseDesktopMediaFunction:: | 129 DesktopCaptureChooseDesktopMediaFunction:: |
| 130 SetPickerFactoryForTests(NULL); | 130 SetPickerFactoryForTests(NULL); |
| 131 } | 131 } |
| 132 | 132 |
| 133 protected: | 133 protected: |
| 134 GURL GetURLForPath(const std::string& host, const std::string& path) { | 134 GURL GetURLForPath(const std::string& host, const std::string& path) { |
| 135 std::string port = base::IntToString(embedded_test_server()->port()); | 135 std::string port = base::UintToString(embedded_test_server()->port()); |
| 136 GURL::Replacements replacements; | 136 GURL::Replacements replacements; |
| 137 replacements.SetHostStr(host); | 137 replacements.SetHostStr(host); |
| 138 replacements.SetPortStr(port); | 138 replacements.SetPortStr(port); |
| 139 return embedded_test_server()->GetURL(path).ReplaceComponents(replacements); | 139 return embedded_test_server()->GetURL(path).ReplaceComponents(replacements); |
| 140 } | 140 } |
| 141 | 141 |
| 142 FakeDesktopMediaPickerFactory picker_factory_; | 142 FakeDesktopMediaPickerFactory picker_factory_; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace | 145 } // namespace |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 EXPECT_TRUE(result); | 236 EXPECT_TRUE(result); |
| 237 EXPECT_TRUE(test_flags[2].picker_created); | 237 EXPECT_TRUE(test_flags[2].picker_created); |
| 238 EXPECT_FALSE(test_flags[2].picker_deleted); | 238 EXPECT_FALSE(test_flags[2].picker_deleted); |
| 239 | 239 |
| 240 web_contents->Close(); | 240 web_contents->Close(); |
| 241 destroyed_watcher.Wait(); | 241 destroyed_watcher.Wait(); |
| 242 EXPECT_TRUE(test_flags[2].picker_deleted); | 242 EXPECT_TRUE(test_flags[2].picker_deleted); |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace extensions | 245 } // namespace extensions |
| OLD | NEW |