summaryrefslogtreecommitdiffstats
path: root/chrome/test/media_router/resources/no_provider.html
blob: 95621d963e2a319712074025107a6b1e582b0420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>MR Integration Basic Test</title>
    <link href="https://www.google.com/cast?__testprovider__=true" rel="default-presentation">
    <script type="text/javascript" src="common.js"></script>
    <script>
    /**
     * Checks if the session has NOT been started successfully.
     */
    function checkSessionFailedToStart() {
      if (!startSessionPromise) {
        sendResult(false, 'Failed to start session');
      } else {
        startSessionPromise.then(
          function (currentSession) {
            sendResult(false, 'Session should not be started successfully.');
          }).catch(function(e) {
            if (e.message.indexOf('No provider supports it') > -1) {
              sendResult(true, '');
            }
            sendResult(false,
              'Error message is not correct, ' +
              'it should contain "No provider supports it"');
        })
      }
    }
    </script>
  </head>
  <body>
  </body>
</html>