OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Library providing basic test framework functionality. | 6 * @fileoverview Library providing basic test framework functionality. |
7 */ | 7 */ |
8 | 8 |
9 /** | 9 /** |
10 * Namespace for |Test|. | 10 * Namespace for |Test|. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 */ | 115 */ |
116 testShouldFail: false, | 116 testShouldFail: false, |
117 | 117 |
118 /** | 118 /** |
119 * Extra libraries to add before loading this test file. | 119 * Extra libraries to add before loading this test file. |
120 * @type {Array.<string>} | 120 * @type {Array.<string>} |
121 */ | 121 */ |
122 extraLibraries: [], | 122 extraLibraries: [], |
123 | 123 |
124 /** | 124 /** |
| 125 * Whether to run the accessibility checks. |
| 126 * @type {boolean} |
| 127 */ |
| 128 runAccessibilityChecks : true, |
| 129 |
| 130 /** |
| 131 * Whether to treat accessibility issues (errors or warnings) as test |
| 132 * failures. If true, any accessibility issues will cause the test to fail. |
| 133 * If false, accessibility issues will cause a console.warn. |
| 134 * Off by default to begin with; as we add the ability to suppress false |
| 135 * positives, we will transition this to true. |
| 136 * @type {boolean} |
| 137 */ |
| 138 accessibilityIssuesAreErrors: false, |
| 139 |
| 140 /** |
125 * Create a new class to handle |messageNames|, assign it to | 141 * Create a new class to handle |messageNames|, assign it to |
126 * |this.mockHandler|, register its messages and return it. | 142 * |this.mockHandler|, register its messages and return it. |
127 * @return {Mock} Mock handler class assigned to |this.mockHandler|. | 143 * @return {Mock} Mock handler class assigned to |this.mockHandler|. |
128 */ | 144 */ |
129 makeAndRegisterMockHandler: function(messageNames) { | 145 makeAndRegisterMockHandler: function(messageNames) { |
130 var MockClass = makeMockClass(messageNames); | 146 var MockClass = makeMockClass(messageNames); |
131 this.mockHandler = mock(MockClass); | 147 this.mockHandler = mock(MockClass); |
132 registerMockMessageCallbacks(this.mockHandler, MockClass); | 148 registerMockMessageCallbacks(this.mockHandler, MockClass); |
133 return this.mockHandler; | 149 return this.mockHandler; |
134 }, | 150 }, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 * This class is not exported and is available to hold the state of the | 243 * This class is not exported and is available to hold the state of the |
228 * |currentTestCase| throughout preload and test run. | 244 * |currentTestCase| throughout preload and test run. |
229 * @param {string} name The name of the test case. | 245 * @param {string} name The name of the test case. |
230 * @param {Test} fixture The fixture object for this test case. | 246 * @param {Test} fixture The fixture object for this test case. |
231 * @param {Function} body The code to run for the test. | 247 * @param {Function} body The code to run for the test. |
232 * @constructor | 248 * @constructor |
233 */ | 249 */ |
234 function TestCase(name, fixture, body) { | 250 function TestCase(name, fixture, body) { |
235 this.name = name; | 251 this.name = name; |
236 this.fixture = fixture; | 252 this.fixture = fixture; |
| 253 this.runAccessibilityChecks = fixture.runAccessibilityChecks; |
| 254 this.accessibilityIssuesAreErrors = fixture.accessibilityIssuesAreErrors; |
237 this.body = body; | 255 this.body = body; |
238 } | 256 } |
239 | 257 |
240 TestCase.prototype = { | 258 TestCase.prototype = { |
241 /** | 259 /** |
242 * The name of this test. | 260 * The name of this test. |
243 * @type {string} | 261 * @type {string} |
244 */ | 262 */ |
245 name: null, | 263 name: null, |
246 | 264 |
(...skipping 10 matching lines...) Expand all Loading... |
257 body: null, | 275 body: null, |
258 | 276 |
259 /** | 277 /** |
260 * True when the test fixture will run the test later. | 278 * True when the test fixture will run the test later. |
261 * @type {boolean} | 279 * @type {boolean} |
262 * @private | 280 * @private |
263 */ | 281 */ |
264 deferred_: false, | 282 deferred_: false, |
265 | 283 |
266 /** | 284 /** |
| 285 * @see Test.runAccessibilityChecks |
| 286 * TestCase-specific value for |Test.runAccessibilityChecks|. This allows an |
| 287 * individual test case to override the value in the test fixture, using |
| 288 * enableAccessibilityChecks() or disableAccessibilityChecks(). |
| 289 * @type {boolean} |
| 290 */ |
| 291 runAccessibilityChecks: true, |
| 292 |
| 293 /** |
| 294 * @see Test.accessibilityIssuesAreErrors |
| 295 * TestCase-specific value for |Test.accessibilityIssuesAreErrors|. This |
| 296 * allows an individual test case to override the value in the test |
| 297 * fixture, using accessibilityIssuesAreErrors(flag). |
| 298 * @type {boolean} |
| 299 */ |
| 300 accessibilityIssuesAreErrors: true, |
| 301 |
| 302 /** |
267 * Called at preload time, proxies to the fixture. | 303 * Called at preload time, proxies to the fixture. |
268 * @type {Function} | 304 * @type {Function} |
269 */ | 305 */ |
270 preLoad: function(name) { | 306 preLoad: function(name) { |
271 if (this.fixture) | 307 if (this.fixture) |
272 this.fixture.preLoad(); | 308 this.fixture.preLoad(); |
273 }, | 309 }, |
274 | 310 |
275 /** | 311 /** |
276 * Called before a test runs. | 312 * Called before a test runs. |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 var testIsDone = false; | 614 var testIsDone = false; |
579 | 615 |
580 /** | 616 /** |
581 * Holds the errors, if any, caught by expects so that the test case can | 617 * Holds the errors, if any, caught by expects so that the test case can |
582 * fail. Cleared when results are reported from runTest() or testDone(). | 618 * fail. Cleared when results are reported from runTest() or testDone(). |
583 * @type {Array.<Error>} | 619 * @type {Array.<Error>} |
584 */ | 620 */ |
585 var errors = []; | 621 var errors = []; |
586 | 622 |
587 /** | 623 /** |
| 624 * Holds any accessibility errors found during the accessibility audit. |
| 625 * Like |errors|, cleared when results are reported. |
| 626 * @type {Array.<string>} |
| 627 */ |
| 628 var a11yErrors_ = []; |
| 629 |
| 630 /** |
| 631 * Holds any accessibility warnings found during the accessibility audit. |
| 632 * Like |errors|, cleared when results are reported. |
| 633 * @type {Array.<string>} |
| 634 */ |
| 635 var a11yWarnings_ = []; |
| 636 |
| 637 /** |
| 638 * Gets the list of accessibility errors found during the accessibility |
| 639 * audit. Only for use in testing. |
| 640 * @return {Array.<string>} |
| 641 */ |
| 642 function getAccessibilityErrors() { |
| 643 return a11yErrors_; |
| 644 }; |
| 645 |
| 646 /** |
| 647 * Gets the list of accessibility warnings found during the accessibility |
| 648 * audit. Only for use in testing. |
| 649 * @return {Array.<string>} |
| 650 */ |
| 651 function getAccessibilityWarnings() { |
| 652 return a11yWarnings_; |
| 653 }; |
| 654 |
| 655 /** |
588 * URL to dummy WebUI page for testing framework. | 656 * URL to dummy WebUI page for testing framework. |
589 * @type {string} | 657 * @type {string} |
590 */ | 658 */ |
591 var DUMMY_URL = 'chrome://DummyURL'; | 659 var DUMMY_URL = 'chrome://DummyURL'; |
592 | 660 |
593 /** | 661 /** |
594 * Resets test state by clearing |errors| and |testIsDone| flags. | 662 * Resets test state by clearing |errors| and |testIsDone| flags. |
595 */ | 663 */ |
596 function resetTestState() { | 664 function resetTestState() { |
597 errors.splice(0, errors.length); | 665 errors.splice(0, errors.length); |
598 testIsDone = false; | 666 testIsDone = false; |
599 } | 667 } |
600 | 668 |
601 /** | 669 /** |
602 * Notifies the running browser test of the test results. Clears |errors|. | 670 * Notifies the running browser test of the test results. Clears |errors|. |
603 * @param {Array.<boolean, string>=} result When passed, this is used for the | 671 * @param {Array.<boolean, string>=} result When passed, this is used for the |
604 * testResult message. | 672 * testResult message. |
605 */ | 673 */ |
606 function testDone(result) { | 674 function testDone(result) { |
607 if (!testIsDone) { | 675 if (!testIsDone) { |
608 testIsDone = true; | 676 testIsDone = true; |
609 if (currentTestCase) { | 677 if (currentTestCase) { |
| 678 if (currentTestCase.runAccessibilityChecks) { |
| 679 var a11yOk = runAccessibilityAudit(a11yErrors_, a11yWarnings_); |
| 680 if (!a11yOk) { |
| 681 if (currentTestCase.accessibilityIssuesAreErrors && result) { |
| 682 result = [false, a11yIssuesToMessage(a11yErrors_, |
| 683 a11yWarnings_, |
| 684 result[1])]; |
| 685 } else |
| 686 console.warn(a11yIssuesToMessage(a11yErrors_, a11yWarnings_)); |
| 687 } |
| 688 } |
| 689 |
610 try { | 690 try { |
611 currentTestCase.tearDown(); | 691 currentTestCase.tearDown(); |
612 } catch (e) { | 692 } catch (e) { |
613 // Caught an exception in tearDown; Register the error and recreate | 693 // Caught an exception in tearDown; Register the error and recreate |
614 // the result if it is passed in. | 694 // the result if it is passed in. |
615 errors.push(e); | 695 errors.push(e); |
616 if (result) | 696 if (result) |
617 result = [false, errorsToMessage([e], result[1])]; | 697 result = [false, errorsToMessage([e], result[1])]; |
618 } | 698 } |
| 699 if (!result) |
| 700 result = testResult(); |
619 currentTestCase = null; | 701 currentTestCase = null; |
620 } | 702 } |
621 chrome.send('testResult', result ? result : testResult()); | 703 if (!result) |
| 704 result = testResult(); |
| 705 chrome.send('testResult', result); |
622 errors.splice(0, errors.length); | 706 errors.splice(0, errors.length); |
| 707 a11yErrors_.splice(0, a11yErrors_.length); |
623 } else { | 708 } else { |
624 console.warn('testIsDone already'); | 709 console.warn('testIsDone already'); |
625 } | 710 } |
626 } | 711 } |
627 | 712 |
628 /** | 713 /** |
629 * Converts each Error in |errors| to a suitable message, adding them to | 714 * Converts each Error in |errors| to a suitable message, adding them to |
630 * |message|, and returns the message string. | 715 * |message|, and returns the message string. |
631 * @param {Array.<Error>} errors Array of errors to add to |message|. | 716 * @param {Array.<Error>} errors Array of errors to add to |message|. |
632 * @param {string?} message When supplied, error messages are appended to it. | 717 * @param {string?} message When supplied, error messages are appended to it. |
(...skipping 12 matching lines...) Expand all Loading... |
645 return message; | 730 return message; |
646 } | 731 } |
647 | 732 |
648 /** | 733 /** |
649 * Returns [success, message] & clears |errors|. | 734 * Returns [success, message] & clears |errors|. |
650 * @param {boolean} errorsOk When true, errors are ok. | 735 * @param {boolean} errorsOk When true, errors are ok. |
651 * @return {Array.<boolean, string>} | 736 * @return {Array.<boolean, string>} |
652 */ | 737 */ |
653 function testResult(errorsOk) { | 738 function testResult(errorsOk) { |
654 var result = [true, '']; | 739 var result = [true, '']; |
655 if (errors.length) { | 740 if (errors.length) |
656 result = [!!errorsOk, errorsToMessage(errors)]; | 741 result = [!!errorsOk, errorsToMessage(errors)]; |
| 742 |
| 743 if (currentTestCase && |
| 744 currentTestCase.accessibilityIssuesAreErrors && |
| 745 (a11yWarnings_.length || a11yErrors_.length)) { |
| 746 result = [!!errorsOk, a11yIssuesToMessage(a11yErrors_, |
| 747 a11yWarnings_, |
| 748 result[1])]; |
657 } | 749 } |
658 return result; | 750 return result; |
659 } | 751 } |
660 | 752 |
661 // Asserts. | 753 // Asserts. |
662 // Use the following assertions to verify a condition within a test. | 754 // Use the following assertions to verify a condition within a test. |
663 // If assertion fails, throw an Error with information pertinent to the test. | 755 // If assertion fails, throw an Error with information pertinent to the test. |
664 | 756 |
665 /** | 757 /** |
666 * When |test| !== true, aborts the current test. | 758 * When |test| !== true, aborts the current test. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 * Always aborts the current test. | 878 * Always aborts the current test. |
787 * @param {string=} message The message to include in the Error thrown. | 879 * @param {string=} message The message to include in the Error thrown. |
788 * @throws {Error} always. | 880 * @throws {Error} always. |
789 */ | 881 */ |
790 function assertNotReached(message) { | 882 function assertNotReached(message) { |
791 helper.registerCall(); | 883 helper.registerCall(); |
792 throw new Error(helper.getCallMessage(message)); | 884 throw new Error(helper.getCallMessage(message)); |
793 } | 885 } |
794 | 886 |
795 /** | 887 /** |
| 888 * Run an accessibility audit on the current page state. |
| 889 * @type {Function} |
| 890 * @return {boolean} Whether there were any errors or warnings |
| 891 * @private |
| 892 */ |
| 893 function runAccessibilityAudit(a11yErrors, a11yWarnings) { |
| 894 var auditResults = axs.Audit.run(); |
| 895 for (var i = 0; i < auditResults.length; i++) { |
| 896 var auditResult = auditResults[i]; |
| 897 if (auditResult.result == axs.constants.AuditResult.FAIL) { |
| 898 var auditRule = auditResult.rule; |
| 899 // TODO(aboxhall): more useful error messages (sadly non-trivial) |
| 900 if (auditRule.severity == axs.constants.Severity.Severe) |
| 901 a11yErrors.push(accessibilityErrorMessage(auditRule, auditResult)); |
| 902 else |
| 903 a11yWarnings.push(accessibilityErrorMessage(auditRule, auditResult)); |
| 904 } |
| 905 } |
| 906 |
| 907 // TODO(aboxhall): have strict (no errors or warnings) vs non-strict |
| 908 // (warnings ok) |
| 909 // TODO(aboxhall): some kind of info logging for warnings only?? |
| 910 return (a11yErrors.length == 0 && a11yWarnings.length == 0); |
| 911 } |
| 912 |
| 913 function disableAccessibilityChecks() { |
| 914 if (!currentTestCase) |
| 915 return; |
| 916 currentTestCase.runAccessibilityChecks = false; |
| 917 } |
| 918 |
| 919 function enableAccessibilityChecks() { |
| 920 if (!currentTestCase) |
| 921 return; |
| 922 currentTestCase.runAccessibilityChecks = true; |
| 923 } |
| 924 |
| 925 function accessibilityIssuesAreErrors(flag) { |
| 926 if (!currentTestCase) |
| 927 return; |
| 928 currentTestCase.accessibilityIssuesAreErrors = flag; |
| 929 } |
| 930 |
| 931 /** |
| 932 * Concatenates the accessibility error messages in |a11yErrors| and |
| 933 * |a11yWarnings| in to an accessibility report, appends it to the given |
| 934 * |message| and returns the resulting message string. |
| 935 * @param {Array.<string>} a11yErrors The list of accessibility error messages |
| 936 * @param {Array.<string>} a11yWarnings The list of accessibility warning |
| 937 * messages. |
| 938 * @return {string} |message| + accessibility report. |
| 939 */ |
| 940 function a11yIssuesToMessage(a11yErrors, a11yWarnings, message) { |
| 941 message = message ? message + '\n' : ''; |
| 942 message += '\nAn accessibility audit found '; |
| 943 |
| 944 if (a11yErrors.length > 0) { |
| 945 message += a11yErrors.length + |
| 946 (a11yErrors.length == 1 ? ' error ' : ' errors '); |
| 947 if (a11yWarnings.length > 0) |
| 948 message += 'and '; |
| 949 } |
| 950 if (a11yWarnings.length > 0) { |
| 951 message += a11yWarnings.length + |
| 952 (a11yWarnings.length == 1 ? ' warning ' : ' warnings '); |
| 953 } |
| 954 message += 'on this page.\n'; |
| 955 message += 'For more information, please see ' + |
| 956 'http://chromium.org/developers/accessibility/webui-accessibility-audit'; |
| 957 |
| 958 for (var i = 0; i < a11yErrors.length; i++) |
| 959 message += '\n\n' + a11yErrors[i]; |
| 960 |
| 961 for (var i = 0; i < a11yWarnings.length; i++) |
| 962 message += '\n\n' + a11yWarnings[i]; |
| 963 return message; |
| 964 } |
| 965 |
| 966 /** |
| 967 * Creates an error message for a given accessibility audit rule and |
| 968 * corresponding result. |
| 969 * @param {axs.AuditRule} rule The audit rule which the result is for |
| 970 * @param {Object.<string, (string|Array.<Element>)>} result The result |
| 971 * object returned from the audit. |
| 972 * @return {string} An error message describing the failure and listing |
| 973 * up to five elements which failed the audit rule. |
| 974 */ |
| 975 function accessibilityErrorMessage(rule, result) { |
| 976 if (rule.severity == axs.constants.Severity.Severe) |
| 977 var message = 'Error: ' |
| 978 else |
| 979 var message = 'Warning: ' |
| 980 message += rule.name + ' failed on the following ' + |
| 981 (result.elements.length == 1 ? 'element' : 'elements'); |
| 982 |
| 983 if (result.elements.length == 1) |
| 984 message += ':' |
| 985 else |
| 986 message += ' (1 - ' + Math.min(5, result.elements.length) + |
| 987 ' of ' + result.elements.length + '):'; |
| 988 |
| 989 var maxElements = Math.min(result.elements.length, 5); |
| 990 for (var i = 0; i < maxElements; i++) |
| 991 message += '\n' + axs.utils.getQuerySelectorText(result.elements[i]); |
| 992 return message; |
| 993 } |
| 994 |
| 995 /** |
| 996 * Asserts that the current page state passes the accessibility audit. |
| 997 */ |
| 998 function assertAccessibilityOk() { |
| 999 helper.registerCall(); |
| 1000 var a11yErrors = []; |
| 1001 var a11yWarnings = []; |
| 1002 if (!runAccessibilityAudit(a11yErrors, a11yWarnings)) |
| 1003 throw new Error(a11yIssuesToMessage(a11yErrors, a11yWarnings)); |
| 1004 } |
| 1005 |
| 1006 /** |
796 * Creates a function based upon a function that thows an exception on | 1007 * Creates a function based upon a function that thows an exception on |
797 * failure. The new function stuffs any errors into the |errors| array for | 1008 * failure. The new function stuffs any errors into the |errors| array for |
798 * checking by runTest. This allows tests to continue running other checks, | 1009 * checking by runTest. This allows tests to continue running other checks, |
799 * while failing the overall test if any errors occurrred. | 1010 * while failing the overall test if any errors occurrred. |
800 * @param {Function} assertFunc The function which may throw an Error. | 1011 * @param {Function} assertFunc The function which may throw an Error. |
801 * @return {function(...*):bool} A function that applies its arguments to | 1012 * @return {function(...*):bool} A function that applies its arguments to |
802 * |assertFunc| and returns true if |assertFunc| passes. | 1013 * |assertFunc| and returns true if |assertFunc| passes. |
803 * @see errors | 1014 * @see errors |
804 * @see runTestFunction | 1015 * @see runTestFunction |
805 */ | 1016 */ |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 * @return {RunAllAction} Action for use in will. | 1572 * @return {RunAllAction} Action for use in will. |
1362 */ | 1573 */ |
1363 function runAllActionsAsync(whenTestDone) { | 1574 function runAllActionsAsync(whenTestDone) { |
1364 return new RunAllAction(true, whenTestDone, | 1575 return new RunAllAction(true, whenTestDone, |
1365 Array.prototype.slice.call(arguments, 1)); | 1576 Array.prototype.slice.call(arguments, 1)); |
1366 } | 1577 } |
1367 | 1578 |
1368 // Exports. | 1579 // Exports. |
1369 testing.Test = Test; | 1580 testing.Test = Test; |
1370 exports.testDone = testDone; | 1581 exports.testDone = testDone; |
| 1582 exports.accessibilityIssuesAreErrors = accessibilityIssuesAreErrors; |
1371 exports.assertTrue = assertTrue; | 1583 exports.assertTrue = assertTrue; |
1372 exports.assertFalse = assertFalse; | 1584 exports.assertFalse = assertFalse; |
1373 exports.assertGE = assertGE; | 1585 exports.assertGE = assertGE; |
1374 exports.assertGT = assertGT; | 1586 exports.assertGT = assertGT; |
1375 exports.assertEquals = assertEquals; | 1587 exports.assertEquals = assertEquals; |
1376 exports.assertLE = assertLE; | 1588 exports.assertLE = assertLE; |
1377 exports.assertLT = assertLT; | 1589 exports.assertLT = assertLT; |
1378 exports.assertNotEquals = assertNotEquals; | 1590 exports.assertNotEquals = assertNotEquals; |
1379 exports.assertNotReached = assertNotReached; | 1591 exports.assertNotReached = assertNotReached; |
| 1592 exports.assertAccessibilityOk = assertAccessibilityOk; |
1380 exports.callFunction = callFunction; | 1593 exports.callFunction = callFunction; |
1381 exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; | 1594 exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; |
1382 exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; | 1595 exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; |
| 1596 exports.disableAccessibilityChecks = disableAccessibilityChecks; |
| 1597 exports.enableAccessibilityChecks = enableAccessibilityChecks; |
1383 exports.expectTrue = createExpect(assertTrue); | 1598 exports.expectTrue = createExpect(assertTrue); |
1384 exports.expectFalse = createExpect(assertFalse); | 1599 exports.expectFalse = createExpect(assertFalse); |
1385 exports.expectGE = createExpect(assertGE); | 1600 exports.expectGE = createExpect(assertGE); |
1386 exports.expectGT = createExpect(assertGT); | 1601 exports.expectGT = createExpect(assertGT); |
1387 exports.expectEquals = createExpect(assertEquals); | 1602 exports.expectEquals = createExpect(assertEquals); |
1388 exports.expectLE = createExpect(assertLE); | 1603 exports.expectLE = createExpect(assertLE); |
1389 exports.expectLT = createExpect(assertLT); | 1604 exports.expectLT = createExpect(assertLT); |
1390 exports.expectNotEquals = createExpect(assertNotEquals); | 1605 exports.expectNotEquals = createExpect(assertNotEquals); |
1391 exports.expectNotReached = createExpect(assertNotReached); | 1606 exports.expectNotReached = createExpect(assertNotReached); |
| 1607 exports.expectAccessibilityOk = createExpect(assertAccessibilityOk); |
| 1608 exports.getAccessibilityErrors = getAccessibilityErrors; |
| 1609 exports.getAccessibilityWarnings = getAccessibilityWarnings; |
1392 exports.preloadJavascriptLibraries = preloadJavascriptLibraries; | 1610 exports.preloadJavascriptLibraries = preloadJavascriptLibraries; |
1393 exports.registerMessageCallback = registerMessageCallback; | 1611 exports.registerMessageCallback = registerMessageCallback; |
1394 exports.registerMockGlobals = registerMockGlobals; | 1612 exports.registerMockGlobals = registerMockGlobals; |
1395 exports.registerMockMessageCallbacks = registerMockMessageCallbacks; | 1613 exports.registerMockMessageCallbacks = registerMockMessageCallbacks; |
1396 exports.resetTestState = resetTestState; | 1614 exports.resetTestState = resetTestState; |
| 1615 exports.runAccessibilityAudit = runAccessibilityAudit; |
1397 exports.runAllActions = runAllActions; | 1616 exports.runAllActions = runAllActions; |
1398 exports.runAllActionsAsync = runAllActionsAsync; | 1617 exports.runAllActionsAsync = runAllActionsAsync; |
1399 exports.runTest = runTest; | 1618 exports.runTest = runTest; |
1400 exports.runTestFunction = runTestFunction; | 1619 exports.runTestFunction = runTestFunction; |
1401 exports.SaveMockArguments = SaveMockArguments; | 1620 exports.SaveMockArguments = SaveMockArguments; |
1402 exports.DUMMY_URL = DUMMY_URL; | 1621 exports.DUMMY_URL = DUMMY_URL; |
1403 exports.TEST = TEST; | 1622 exports.TEST = TEST; |
1404 exports.TEST_F = TEST_F; | 1623 exports.TEST_F = TEST_F; |
| 1624 exports.RUNTIME_TEST_F = TEST_F; |
1405 exports.GEN = GEN; | 1625 exports.GEN = GEN; |
1406 exports.GEN_INCLUDE = GEN_INCLUDE; | 1626 exports.GEN_INCLUDE = GEN_INCLUDE; |
1407 exports.WhenTestDone = WhenTestDone; | 1627 exports.WhenTestDone = WhenTestDone; |
1408 | 1628 |
1409 // Import the Mock4JS helpers. | 1629 // Import the Mock4JS helpers. |
1410 Mock4JS.addMockSupport(exports); | 1630 Mock4JS.addMockSupport(exports); |
1411 })(this); | 1631 })(this); |
OLD | NEW |