summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/clear-site-data/support/send_report.html
blob: 6e90c626ea64541b0a147cc2c2d579216c3834cb (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
<!DOCTYPE html>
<html>
  <head>
    <title>Clear-Site-Data</title>
    <script src="test_utils.sub.js"></script>
  </head>
  <body>
    <script>
      /**
       * A map between a datatype name and whether it is empty.
       * @property Object.<string, boolean>
       */
      var report = {};

      Promise.all(TestUtils.DATATYPES.map(function(datatype) {
        return datatype.isEmpty().then(function(isEmpty) {
          report[datatype.name] = isEmpty;
        });
      })).then(function() {
        window.top.postMessage(report, "*");
      });
    </script>
  </body>
</html>