Introduce DevTools Protocol APIs to manipulate Media Router, so that Cast and Presentation API functionalities can be tested via ChromeDriver. This will be necessary for removing WebUI dialog dependency from our tests. Design doc: https://docs.google.com/document/d/1KugGgS9P7qUkBE1oDPnSDhCoEpuiIE96QgSRWf9-bQY/edit#
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4eb3b6e49aa880be6e71504a56719a778be26e82 commit 4eb3b6e49aa880be6e71504a56719a778be26e82 Author: Takumi Fujimoto <takumif@chromium.org> Date: Wed Jan 09 02:59:53 2019 Add Cast domain to DevTools Protocol Create a new DevTools domain "Cast", and add these functions: - setSinkToUse() - startTabMirroring() - stopCasting() - enable() - disable() And events: - sinksUpdated - issueUpdated They will be used by our swarming tests via ChromeDriver. This domain won't be accessible from the DevTools extension API. Design: https://docs.google.com/document/d/1KugGgS9P7qUkBE1oDPnSDhCoEpuiIE96QgSRWf9-bQY/edit Bug: 915056 Change-Id: Iee8ff5e7e7ef02d7750c6fe7f01d1d41a0e9c7f6 Reviewed-on: https://chromium-review.googlesource.com/c/1357282 Commit-Queue: Takumi Fujimoto <takumif@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org> Cr-Commit-Position: refs/heads/master@{#621021} [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/devtools/BUILD.gn [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/devtools/chrome_devtools_session.cc [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/devtools/chrome_devtools_session.h [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/devtools/inspector_protocol_config.json [add] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/devtools/protocol/cast_handler.cc [add] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/devtools/protocol/cast_handler.h [add] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/devtools/protocol/cast_handler_unittest.cc [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/media/router/media_router_dialog_controller.cc [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/media/router/media_router_dialog_controller.h [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/media/router/media_router_dialog_controller_unittest.cc [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/media/router/presentation/presentation_service_delegate_impl.cc [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/media/router/presentation/presentation_service_delegate_impl.h [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/browser/ui/webui/media_router/media_router_dialog_controller_webui_impl_unittest.cc [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/chrome/test/BUILD.gn [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/third_party/blink/renderer/core/inspector/browser_protocol.pdl [modify] https://crrev.com/4eb3b6e49aa880be6e71504a56719a778be26e82/third_party/blink/web_tests/http/tests/devtools/agents-enable-disable.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8 commit 2d59f4930f4afd0cfcc5bebd4d71249554d28fd8 Author: Takumi Fujimoto <takumif@chromium.org> Date: Mon Jan 14 21:44:55 2019 Add Cast commands to ChromeDriver This CL adds Cast-related commands to ChromeDriver that make use of DevTools Protocol API added in crrev.com/c/1357282. These commands call their equivalents in DevTools Protocol: - SetSinkToUse - StartTabMirroring - StopCasting These commands make ChromeDriver start observing for Cast events fired by DevTools (via CastTracker), and return data obtained from events: - GetSinks - GetIssueMessage Bug: 915056 Change-Id: I7f0e890cb21a28ac18c6fb90733e6c2b83fb4210 Reviewed-on: https://chromium-review.googlesource.com/c/1401270 Reviewed-by: John Chen <johnchen@chromium.org> Commit-Queue: Takumi Fujimoto <takumif@chromium.org> Cr-Commit-Position: refs/heads/master@{#622614} [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/BUILD.gn [add] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/cast_tracker.cc [add] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/cast_tracker.h [add] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/cast_tracker_unittest.cc [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/stub_web_view.cc [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/stub_web_view.h [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/web_view.h [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/web_view_impl.cc [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/chrome/web_view_impl.h [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/server/http_handler.cc [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/window_commands.cc [modify] https://crrev.com/2d59f4930f4afd0cfcc5bebd4d71249554d28fd8/chrome/test/chromedriver/window_commands.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a9d8cb348c1c8510e5188384c183e3a502028584 commit a9d8cb348c1c8510e5188384c183e3a502028584 Author: Alexey Baskakov <loyso@chromium.org> Date: Tue Jan 15 02:15:56 2019 Revert "Add Cast commands to ChromeDriver" This reverts commit 2d59f4930f4afd0cfcc5bebd4d71249554d28fd8. Reason for revert: Fails .py chromedriver tests on Mac: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.13%20Tests/8912 Original change's description: > Add Cast commands to ChromeDriver > > This CL adds Cast-related commands to ChromeDriver that make use of > DevTools Protocol API added in crrev.com/c/1357282. > > These commands call their equivalents in DevTools Protocol: > - SetSinkToUse > - StartTabMirroring > - StopCasting > > These commands make ChromeDriver start observing for Cast events fired > by DevTools (via CastTracker), and return data obtained from events: > - GetSinks > - GetIssueMessage > > Bug: 915056 > Change-Id: I7f0e890cb21a28ac18c6fb90733e6c2b83fb4210 > Reviewed-on: https://chromium-review.googlesource.com/c/1401270 > Reviewed-by: John Chen <johnchen@chromium.org> > Commit-Queue: Takumi Fujimoto <takumif@chromium.org> > Cr-Commit-Position: refs/heads/master@{#622614} TBR=johnchen@chromium.org,takumif@chromium.org Change-Id: Idb802d43b7733520d7d1fbe491ac66a05db4eb35 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 915056 Reviewed-on: https://chromium-review.googlesource.com/c/1410423 Reviewed-by: Alexey Baskakov <loyso@chromium.org> Commit-Queue: Alexey Baskakov <loyso@chromium.org> Cr-Commit-Position: refs/heads/master@{#622679} [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/BUILD.gn [delete] https://crrev.com/d3adca4c9f6eec0cd94bbee54db119483772d682/chrome/test/chromedriver/chrome/cast_tracker.cc [delete] https://crrev.com/d3adca4c9f6eec0cd94bbee54db119483772d682/chrome/test/chromedriver/chrome/cast_tracker.h [delete] https://crrev.com/d3adca4c9f6eec0cd94bbee54db119483772d682/chrome/test/chromedriver/chrome/cast_tracker_unittest.cc [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/chrome/stub_web_view.cc [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/chrome/stub_web_view.h [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/chrome/web_view.h [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/chrome/web_view_impl.cc [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/chrome/web_view_impl.h [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/server/http_handler.cc [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/window_commands.cc [modify] https://crrev.com/a9d8cb348c1c8510e5188384c183e3a502028584/chrome/test/chromedriver/window_commands.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8 commit 6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8 Author: Takumi Fujimoto <takumif@chromium.org> Date: Wed Jan 16 02:08:55 2019 Reland: Add Cast commands to ChromeDriver Reland crrev.com/c/1401270. Relanding with no changes, since it doesn't seem to be the cause of the test failure that it was reverted for. Original description: This CL adds Cast-related commands to ChromeDriver that make use of DevTools Protocol API added in crrev.com/c/1357282. These commands call their equivalents in DevTools Protocol: - SetSinkToUse - StartTabMirroring - StopCasting These commands make ChromeDriver start observing for Cast events fired by DevTools (via CastTracker), and return data obtained from events: - GetSinks - GetIssueMessage TBR=johnchen@chromium.org Bug: 915056 Change-Id: Ic63b67e442330437b304f5991c8322e03e71b39f Reviewed-on: https://chromium-review.googlesource.com/c/1401270 Reviewed-by: John Chen <johnchen@chromium.org> Commit-Queue: Takumi Fujimoto <takumif@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#622614} Reviewed-on: https://chromium-review.googlesource.com/c/1412299 Reviewed-by: Takumi Fujimoto <takumif@chromium.org> Cr-Commit-Position: refs/heads/master@{#623032} [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/BUILD.gn [add] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/cast_tracker.cc [add] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/cast_tracker.h [add] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/cast_tracker_unittest.cc [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/stub_web_view.cc [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/stub_web_view.h [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/web_view.h [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/web_view_impl.cc [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/chrome/web_view_impl.h [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/server/http_handler.cc [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/window_commands.cc [modify] https://crrev.com/6e8e1615b3bce78c3e3395bc045ea0ce1aa5abd8/chrome/test/chromedriver/window_commands.h
Comment 1 by bugdroid1@chromium.org
, Jan 9