summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/general/browser_fxa_oauth.html
blob: b31e7ceb44b1cd22f9f0e08bd8be06a83e2acbed (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
<!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 an object instead of a string, to ensure both work
      // (see browser_fxa_oauth_with_keys.html for the other test)
      detail: {
        id: "oauth_client_id",
        message: {
          command: "oauth_complete",
          data: {
            state: "state",
            code: "code1",
            closeWindow: "signin",
          },
        },
      },
    });

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