mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 11:37:43 -10:00
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
33 lines
924 B
HTML
33 lines
924 B
HTML
<!DOCTYPE HTML>
|
|
<meta charset=utf-8>
|
|
<title>Reporting: Order</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>
|
|
<p id="error">No error</p>
|
|
<script>
|
|
var count = 0;
|
|
async_test(function(test) {
|
|
var observer = new ReportingObserver(function(reports) {
|
|
test.step(function() {
|
|
// Reports should be received in the same order that they were
|
|
// generated.
|
|
for(i in reports) {
|
|
assert_equals(reports[i].body.message, "" + count++);
|
|
}
|
|
});
|
|
|
|
if (count == 10)
|
|
test.done();
|
|
});
|
|
observer.observe();
|
|
|
|
for (i = 0; i != 10; ++i)
|
|
test_driver.generate_test_report("" + i);
|
|
}, "Order");
|
|
</script>
|
|
</body>
|
|
</html>
|