Files
Paul Meyer d1bcc55996 Bug 1529156 [wpt PR 15305] - Add testdriver support for generate_test_report WebDriver command., a=testonly
Automatic update from web-platform-tests
Add testdriver support for generate_test_report WebDriver command.

Also adds Reporting API tests which utilize this command.

--
fix lint errors

--
Add comments to tests

--

wpt-commits: 5109698f5a9b61797c86fda8000baeb0e701f3f1, 49f474206a2374f3da136f3ddb62cb85ea5c5532, c0a12dae123c560ef835c19e166a253e44275c80
wpt-pr: 15305
2019-03-16 12:13:09 +00:00

31 lines
986 B
HTML

<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Reporting: Nested report</title>
<link rel="author" title="Paul Meyer" href="[email protected]">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
// Test that reports can be generated within a ReportingObserver
// callback. These reports should be received by the same observer.
async_test(function(test) {
var step = 0;
var observer = new ReportingObserver(async function(reports, observer) {
test.step(function() {
assert_equals(reports.length, 1);
assert_equals(reports[0].body.message, "" + step);
});
++step;
if (step == 3)
test.done();
test_driver.generate_test_report("" + step);
});
observer.observe();
test_driver.generate_test_report("0");
}, "Nested report");
</script>