summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/general/browser_fxa_oauth_with_keys.html
blob: 2c28f70880518c53af76b66121a65d913f9596d1 (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
33
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>fxa_oauth_test</title>
</head>
<body>
<script>
  window.onload = function() {
    var event = new window.CustomEvent("WebChannelMessageToChrome", {
      // Note: This intentionally sends a string instead of an object, to ensure both work
      // (see browser_fxa_oauth.html for the other test)
      detail: JSON.stringify({
        id: "oauth_client_id",
        message: {
          command: "oauth_complete",
          data: {
            state: "state",
            code: "code1",
            closeWindow: "signin",
            // Keys normally contain more information, but this is enough
            // to keep Loop's tests happy.
            keys: { kAr: { k: 'kAr' }, kBr: { k: 'kBr' }},
          },
        },
      }),
    });

    window.dispatchEvent(event);
  };
</script>
</body>
</html>