New issue
Advanced search Search tips

Issue 678472 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 822231
issue 900248


Participants' hotlists:
media-router-fixit


Sign in to add a comment

[Media Router] Improve browser test coverage

Project Member Reported by taku...@chromium.org, Jan 5 2017

Issue description

This bug tracks the work to improve browser test coverage of MR code.

According to the "MR Tests" spreadsheet, we're missing test cases for the following:

Start desktop mirroring
Stop desktop mirroring
State change to connected (after making connecting the initial state)
State change to closed due to close()
Launch MR from toolbar icon
Launch MR from hamburger menu
Launch MR from context menu
Incognito: Start route
Incognito: Join route
Incognito: Route is closed when profile destroyed
Close presentation via API and re-open it
Start presentation with InvalidAccessError
Start presentation with SecurityError
Start presentation with OperationError
Start presentation with NotFoundError 
Create presentation request with SyntaxError 
Send message when the connection is not connected, got InvalidStateError
Mute and unmute audio from pop up dialog when mirroring
Fling a video via Presentation API, check the custom dialog?
 
On the spreadsheet, there's a test case to "Start presentation with AbortError" whose link [1] seems out of sync. The Presentation API spec also doesn't mention AbortError. Can we remove that item?

[1] https://code.google.com/p/chromium/codesearch#chromium/src/chrome/test/media_router/media_router_integration_browsertest.cc&l=492

Comment 2 by mfo...@chromium.org, Jan 12 2017

Here are the current list of error cases for PresentationRequest in the spec.  I believe AbortError has been replaced by NotAllowedError for user cancelling display.

constructor:
1. SecurityError (mixed content)
2. NotSupportedError (empty URL list)
3. SyntaxError (invalid URL)

start():
4. InvalidAccessError (can't show popup)
5. OperationError (already a request to start() from same tab)
6. NotFoundError (no presentation displays / can't find displays)
7. NotAllowedError (user cancels display selection)
8. presentationConnection is returned, but ends up in error state (can't start presentation)

reconnect():
9. NotFoundError (no presentation with matching url/id)

getAvailability():
10. NotSupportedError (can't monitor display availability)

Of the list above, it's really 6-10 that depend on the behavior of the browser implementation, i.e. you would need to mock out some behavior of the MRP to be able to test it end-to-end.  Errors 1-5 are implemented in Blink and the browser behavior is not as relevant.

I'll update the sheet accordingly.
 

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4809bbc10e25dff14277270bbff6d6f504178a12

commit 4809bbc10e25dff14277270bbff6d6f504178a12
Author: takumif <takumif@chromium.org>
Date: Fri Jan 13 00:00:30 2017

[Media Router] Add browser tests for showing the dialog

This CL adds test cases for opening the media router dialog from the page
context menu and the app menu.

BUG=678472

Review-Url: https://codereview.chromium.org/2621723003
Cr-Commit-Position: refs/heads/master@{#443398}

[modify] https://crrev.com/4809bbc10e25dff14277270bbff6d6f504178a12/chrome/browser/ui/views/media_router/media_router_ui_browsertest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Feb 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad5a427bf19d3422f39d4d4f2b0b6ad97621c8a6

commit ad5a427bf19d3422f39d4d4f2b0b6ad97621c8a6
Author: takumif <takumif@chromium.org>
Date: Sat Feb 18 20:50:01 2017

[Media Router] Add integration browser tests

This CL adds the following tests:
- MediaRouterIntegrationBrowserTest.MANUAL_Fail_SendMessage
- MediaRouterIntegrationIncognitoBrowserTest.MANUAL_Basic
- MediaRouterIntegrationIncognitoBrowserTest.MANUAL_ReconnectSession
- (Rename MANUAL_OnClose to MANUAL_CloseOnError)

and does some refactoring to factor out parts common across many tests.

BUG=678472

Review-Url: https://codereview.chromium.org/2634213002
Cr-Commit-Position: refs/heads/master@{#451492}

[modify] https://crrev.com/ad5a427bf19d3422f39d4d4f2b0b6ad97621c8a6/chrome/test/media_router/media_router_base_browsertest.cc
[modify] https://crrev.com/ad5a427bf19d3422f39d4d4f2b0b6ad97621c8a6/chrome/test/media_router/media_router_base_browsertest.h
[modify] https://crrev.com/ad5a427bf19d3422f39d4d4f2b0b6ad97621c8a6/chrome/test/media_router/media_router_integration_browsertest.cc
[modify] https://crrev.com/ad5a427bf19d3422f39d4d4f2b0b6ad97621c8a6/chrome/test/media_router/media_router_integration_browsertest.h
[modify] https://crrev.com/ad5a427bf19d3422f39d4d4f2b0b6ad97621c8a6/chrome/test/media_router/resources/common.js

Comment 5 by mfo...@chromium.org, Oct 26 2017

Let's target M-65 to close this out.

Comment 6 by mfo...@chromium.org, Oct 26 2017

Labels: M-65

Comment 7 by mfo...@chromium.org, Oct 26 2017

Status: Assigned (was: Available)
Labels: -OS-All
Status: Started (was: Assigned)
From what I can tell, we still want tests for the following:
- Desktop mirroring
- Incognito: Route is closed when profile destroyed
- WebUI route controls

For desktop mirroring, I'm not sure how to get through the desktop picker window programmatically.

For testing WebUI route controls, I'm thinking of creating a C++ test MRP similar to the JavaScript test MRP, except it'd support route controllers.
Labels: -M-65
Also see Bug 505664.  We should align test coverage with manual WPT to prevent regressions until manual WPT can be fully automated in content_shell.

To media_router_one_ua_integration_browsertest, add cases as needed for:

- Termination behavior (both controller and receiver)
- Steps to connect to a presentation (all states/events)
- Steps to reconnect to a presentation (all states/events)
- Starting a presentation from the browser (defaultRequest)
- PresentationAvailability objects

There is some coverage for these but it could be improved.





Cc: taku...@chromium.org
Owner: mfo...@chromium.org
Status: Assigned (was: Started)
Blockedon: 822231
We can't really make progress on this until the current suite is stabilized in the waterfall.

Cc: powerb@chromium.org
Cc: mfo...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Blockedon: 900248
Project Member

Comment 16 by bugdroid1@chromium.org, Jan 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7eed462400adc7478d33776190104ad595879905

commit 7eed462400adc7478d33776190104ad595879905
Author: Peter Kasting <pkasting@chromium.org>
Date: Wed Jan 02 20:42:46 2019

Re-enable disabled tests in chrome/browser/ui/views/media_router/.

These pass on Windows.

This requires (mostly) reverting
https://chromium-review.googlesource.com/c/chromium/src/+/1005103 .
The revert is not perfect since many things changed since that CL
initially landed (e.g. various tests got disabled).

Bug:  658005 , 678472, 817408,  828031 ,  843599 ,  849146 ,  863945 
Change-Id: I23a3010be1faf962e0a2dfbaaa4a57a3e2cc89d3
Reviewed-on: https://chromium-review.googlesource.com/c/1351874
Reviewed-by: Ben Wells <benwells@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619483}
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/apps/platform_apps/app_window_interactive_uitest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/devtools/devtools_sanity_interactive_browsertest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/extensions/api/tabs/tabs_test.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/notifications/notification_interactive_uitest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/ui/exclusive_access/fullscreen_controller_test.h
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/ui/keyboard_lock_interactive_browsertest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/ui/views/media_router/cast_dialog_view_unittest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/ui/views/media_router/media_router_ui_browsertest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/browser/ui/views/media_router/presentation_receiver_window_view_browsertest.cc
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/chrome/test/base/in_process_browser_test.h
[modify] https://crrev.com/7eed462400adc7478d33776190104ad595879905/testing/buildbot/filters/mac_window_server_killers.browser_tests.filter

Components: Tests>Missing
Components: -Test>Missing

Sign in to add a comment