tree: 482a8487e6ab53a8e48a95f380084545e66f9f24 [path history] [tgz]
  1. basic_test.html
  2. close_route_with_error_on_send.json
  3. common.js
  4. fail_create_route.json
  5. fail_reconnect_session.html
  6. fail_reconnect_session.json
  7. no_provider.json
  8. no_sinks.json
  9. no_supported_sinks.json
  10. README.md
  11. 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”} }