Debian Codegraph @

testing/web-platform/tests/resources/testharnessreport.js

raw
1 /* global add_completion_callback */
2 /* global setup */
3
4 /*
5 * This file is intended for vendors to implement code needed to integrate
6 * testharness.js tests with their own test systems.
7 *
8 * Typically test system integration will attach callbacks when each test has
9 * run, using add_result_callback(callback(test)), or when the whole test file
10 * has completed, using
11 * add_completion_callback(callback(tests, harness_status)).
12 *
13 * For more documentation about the callback functions and the
14 * parameters they are called with see testharness.js
15 */
16
17 /* If the parent window has a testharness_properties object,
18 * we use this to provide the test settings. This is used by the
19 * default in-browser runner to configure the timeout and the
20 * rendering of results
21 */
22 try {
23 if (window.opener && "testharness_properties" in window.opener) {
24 /* If we pass the testharness_properties object as-is here without
25 * JSON stringifying and reparsing it, IE fails & emits the message
26 * "Could not complete the operation due to error 80700019".
27 */
28 setup(JSON.parse(JSON.stringify(window.opener.testharness_properties)));
29 }
30 } catch (e) {
31 }
32 // vim: set expandtab shiftwidth=4 tabstop=4: