tree: 5b91c62dbb7edd5a1574a562fa01c96125081966 [path history] [tgz]
  1. README.md
  2. basic_test.html
  3. close_route_with_error_on_send.json
  4. common.js
  5. fail_create_route.json
  6. fail_reconnect_session.html
  7. fail_reconnect_session.json
  8. local_media_sink.json
  9. local_media_sink_route_fail.json
  10. no_presentation_receiver.html
  11. no_provider.json
  12. no_sinks.json
  13. no_supported_sinks.json
  14. presentation_receiver.html
  15. route_creation_timed_out.json
chrome/test/media_router/resources/README.md

The document shows how to create a test data file which is used for the integration test to inject test data before running test.

The test data is a JSON string and here is full example with description:

{ // Define the return value for getAvailableSinks API defined in // TestProvider.js. // The value is a map from source urn to a list of sinks as following. Default // value is for test source urn only and is: // [{“id”: “id1”, “friendlyName”: “test-sink-1”}, // {“id”: “id2”, “friendlyName”: “test-sink-2”}] “getAvailableSinks”: { “http://www.google.com/”: [ {“id”: “id1”, “friendlyName”: “test-device-1”}, {“id”: “id2”, “friendlyName”: “test-device-2”} ] },

// Define the return value for canRoute API, the return value should be // either ‘true’ or ‘false’. The default value is ‘true’. “canRoute”: “true”,

// Define the return value for createRoute API. Since the return type of // createRoute is a Promise, here we just need to define // if return successful result or error. // The value for ‘passed’ should be either ‘true’ or ‘false’. // If it is ‘false’, you also need to give the corresponding // error message. If it is ‘true’, the error message will be ignored. // TODO(leilei): Change keyword ‘passed’ to ‘success’. “createRoute”: {“passed”: “false”, “errorMessage”: “Unknown sink”} }