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, accessibilityAuditReport(a11yErrors_, | |
683 a11yWarnings_, | |
684 result[1])]; | |
685 } else { | |
686 console.warn(accessibilityAuditReport(a11yErrors_, | |
687 a11yWarnings_)); | |
688 } | |
689 } | |
690 } | |
691 | |
692 if (result) | |
693 errors.splice(0, errors.length); | |
610 try { | 694 try { |
611 currentTestCase.tearDown(); | 695 currentTestCase.tearDown(); |
612 } catch (e) { | 696 } catch (e) { |
613 // Caught an exception in tearDown; Register the error and recreate | 697 // Caught an exception in tearDown; Register the error and recreate |
614 // the result if it is passed in. | 698 // the result if it is passed in. |
615 errors.push(e); | 699 errors.push(e); |
616 if (result) | 700 if (result) |
617 result = [false, errorsToMessage([e], result[1])]; | 701 result = [false, errorsToMessage([e], result[1])]; |
618 } | 702 } |
703 if (!result) | |
704 result = testResult(); | |
705 else if (errors.length) { | |
706 // Add errors generated in tearDown | |
707 result = [false, errorsToMessage(errors, result[1])]; | |
708 } | |
709 | |
619 currentTestCase = null; | 710 currentTestCase = null; |
620 } | 711 } |
621 chrome.send('testResult', result ? result : testResult()); | 712 if (!result) |
713 result = testResult(); | |
714 chrome.send('testResult', result); | |
622 errors.splice(0, errors.length); | 715 errors.splice(0, errors.length); |
716 a11yErrors_.splice(0, a11yErrors_.length); | |
717 a11yWarnings_.splice(0, a11yWarnings_.length); | |
623 } else { | 718 } else { |
624 console.warn('testIsDone already'); | 719 console.warn('testIsDone already'); |
625 } | 720 } |
626 } | 721 } |
627 | 722 |
628 /** | 723 /** |
629 * Converts each Error in |errors| to a suitable message, adding them to | 724 * Converts each Error in |errors| to a suitable message, adding them to |
630 * |message|, and returns the message string. | 725 * |message|, and returns the message string. |
631 * @param {Array.<Error>} errors Array of errors to add to |message|. | 726 * @param {Array.<Error>} errors Array of errors to add to |message|. |
632 * @param {string?} message When supplied, error messages are appended to it. | 727 * @param {string?} message When supplied, error messages are appended to it. |
(...skipping 12 matching lines...) Expand all Loading... | |
645 return message; | 740 return message; |
646 } | 741 } |
647 | 742 |
648 /** | 743 /** |
649 * Returns [success, message] & clears |errors|. | 744 * Returns [success, message] & clears |errors|. |
650 * @param {boolean} errorsOk When true, errors are ok. | 745 * @param {boolean} errorsOk When true, errors are ok. |
651 * @return {Array.<boolean, string>} | 746 * @return {Array.<boolean, string>} |
652 */ | 747 */ |
653 function testResult(errorsOk) { | 748 function testResult(errorsOk) { |
654 var result = [true, '']; | 749 var result = [true, '']; |
655 if (errors.length) { | 750 if (errors.length) |
656 result = [!!errorsOk, errorsToMessage(errors)]; | 751 result = [!!errorsOk, errorsToMessage(errors)]; |
752 | |
753 if (currentTestCase && | |
754 currentTestCase.accessibilityIssuesAreErrors && | |
755 (a11yWarnings_.length || a11yErrors_.length)) { | |
756 result = [!!errorsOk, accessibilityAuditReport(a11yErrors_, | |
757 a11yWarnings_, | |
758 result[1])]; | |
657 } | 759 } |
658 return result; | 760 return result; |
659 } | 761 } |
660 | 762 |
661 // Asserts. | 763 // Asserts. |
662 // Use the following assertions to verify a condition within a test. | 764 // Use the following assertions to verify a condition within a test. |
663 // If assertion fails, throw an Error with information pertinent to the test. | 765 // If assertion fails, throw an Error with information pertinent to the test. |
664 | 766 |
665 /** | 767 /** |
666 * When |test| !== true, aborts the current test. | 768 * 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. | 888 * Always aborts the current test. |
787 * @param {string=} message The message to include in the Error thrown. | 889 * @param {string=} message The message to include in the Error thrown. |
788 * @throws {Error} always. | 890 * @throws {Error} always. |
789 */ | 891 */ |
790 function assertNotReached(message) { | 892 function assertNotReached(message) { |
791 helper.registerCall(); | 893 helper.registerCall(); |
792 throw new Error(helper.getCallMessage(message)); | 894 throw new Error(helper.getCallMessage(message)); |
793 } | 895 } |
794 | 896 |
795 /** | 897 /** |
898 * Run an accessibility audit on the current page state. | |
899 * @type {Function} | |
900 * @return {boolean} Whether there were any errors or warnings | |
901 * @private | |
902 */ | |
903 function runAccessibilityAudit(a11yErrors, a11yWarnings) { | |
904 var auditResults = axs.Audit.run(); | |
905 for (var i = 0; i < auditResults.length; i++) { | |
906 var auditResult = auditResults[i]; | |
907 if (auditResult.result == axs.constants.AuditResult.FAIL) { | |
908 var auditRule = auditResult.rule; | |
909 // TODO(aboxhall): more useful error messages (sadly non-trivial) | |
910 if (auditRule.severity == axs.constants.Severity.Severe) | |
911 a11yErrors.push(accessibilityErrorMessage(auditRule, auditResult)); | |
912 else | |
913 a11yWarnings.push(accessibilityErrorMessage(auditRule, auditResult)); | |
914 } | |
915 } | |
916 | |
917 // TODO(aboxhall): have strict (no errors or warnings) vs non-strict | |
918 // (warnings ok) | |
919 // TODO(aboxhall): some kind of info logging for warnings only?? | |
920 return (a11yErrors.length == 0 && a11yWarnings.length == 0); | |
921 } | |
922 | |
923 function disableAccessibilityChecks() { | |
924 if (!currentTestCase) | |
925 return; | |
926 currentTestCase.runAccessibilityChecks = false; | |
927 } | |
928 | |
929 function enableAccessibilityChecks() { | |
930 if (!currentTestCase) | |
931 return; | |
932 currentTestCase.runAccessibilityChecks = true; | |
933 } | |
934 | |
935 function accessibilityIssuesAreErrors(flag) { | |
936 if (!currentTestCase) | |
937 return; | |
938 currentTestCase.accessibilityIssuesAreErrors = flag; | |
939 } | |
940 | |
941 /** | |
942 * Concatenates the accessibility error messages in |a11yErrors| and | |
943 * |a11yWarnings| in to an accessibility report, appends it to the given | |
944 * |message| and returns the resulting message string. | |
945 * @param {Array.<string>} a11yErrors The list of accessibility error messages | |
946 * @param {Array.<string>} a11yWarnings The list of accessibility warning | |
947 * messages. | |
948 * @return {string} |message| + accessibility report. | |
949 */ | |
950 function accessibilityAuditReport(a11yErrors, a11yWarnings, message) { | |
951 message = message ? message + '\n' : ''; | |
952 message += '\n*** Begin accessibility audit results ***'; | |
953 message += '\nAn accessibility audit found '; | |
954 | |
955 if (a11yErrors.length > 0) { | |
956 message += a11yErrors.length + | |
957 (a11yErrors.length == 1 ? ' error ' : ' errors '); | |
958 if (a11yWarnings.length > 0) | |
959 message += 'and '; | |
960 } | |
961 if (a11yWarnings.length > 0) { | |
962 message += a11yWarnings.length + | |
963 (a11yWarnings.length == 1 ? ' warning ' : ' warnings '); | |
964 } | |
965 message += 'on this page.\n'; | |
966 message += 'For more information, please see ' + | |
967 'http://chromium.org/developers/accessibility/webui-accessibility-audit'; | |
968 | |
969 for (var i = 0; i < a11yErrors.length; i++) | |
970 message += '\n\n' + a11yErrors[i]; | |
971 | |
972 for (var i = 0; i < a11yWarnings.length; i++) | |
973 message += '\n\n' + a11yWarnings[i]; | |
974 message += '\n*** End accessibility audit results ***'; | |
975 return message; | |
976 } | |
977 | |
978 /** | |
979 * Creates an error message for a given accessibility audit rule and | |
980 * corresponding result. | |
981 * @param {axs.AuditRule} rule The audit rule which the result is for | |
982 * @param {Object.<string, (string|Array.<Element>)>} result The result | |
983 * object returned from the audit. | |
984 * @return {string} An error message describing the failure and listing | |
985 * up to five elements which failed the audit rule. | |
986 */ | |
987 function accessibilityErrorMessage(rule, result) { | |
988 if (rule.severity == axs.constants.Severity.Severe) | |
989 var message = 'Error: ' | |
990 else | |
991 var message = 'Warning: ' | |
992 message += rule.name + ' failed on the following ' + | |
993 (result.elements.length == 1 ? 'element' : 'elements'); | |
994 | |
995 if (result.elements.length == 1) | |
996 message += ':' | |
997 else | |
998 message += ' (1 - ' + Math.min(5, result.elements.length) + | |
999 ' of ' + result.elements.length + '):'; | |
1000 | |
1001 var maxElements = Math.min(result.elements.length, 5); | |
1002 for (var i = 0; i < maxElements; i++) | |
1003 message += '\n' + axs.utils.getQuerySelectorText(result.elements[i]); | |
1004 return message; | |
1005 } | |
1006 | |
1007 /** | |
1008 * Asserts that the current page state passes the accessibility audit. | |
1009 */ | |
1010 function assertAccessibilityOk() { | |
1011 helper.registerCall(); | |
1012 var a11yErrors = []; | |
1013 var a11yWarnings = []; | |
1014 if (!runAccessibilityAudit(a11yErrors, a11yWarnings)) | |
1015 throw new Error(accessibilityAuditReport(a11yErrors, a11yWarnings)); | |
1016 } | |
1017 | |
1018 /** | |
796 * Creates a function based upon a function that thows an exception on | 1019 * 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 | 1020 * failure. The new function stuffs any errors into the |errors| array for |
798 * checking by runTest. This allows tests to continue running other checks, | 1021 * checking by runTest. This allows tests to continue running other checks, |
799 * while failing the overall test if any errors occurrred. | 1022 * while failing the overall test if any errors occurrred. |
800 * @param {Function} assertFunc The function which may throw an Error. | 1023 * @param {Function} assertFunc The function which may throw an Error. |
801 * @return {function(...*):bool} A function that applies its arguments to | 1024 * @return {function(...*):bool} A function that applies its arguments to |
802 * |assertFunc| and returns true if |assertFunc| passes. | 1025 * |assertFunc| and returns true if |assertFunc| passes. |
803 * @see errors | 1026 * @see errors |
804 * @see runTestFunction | 1027 * @see runTestFunction |
805 */ | 1028 */ |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1361 * @return {RunAllAction} Action for use in will. | 1584 * @return {RunAllAction} Action for use in will. |
1362 */ | 1585 */ |
1363 function runAllActionsAsync(whenTestDone) { | 1586 function runAllActionsAsync(whenTestDone) { |
1364 return new RunAllAction(true, whenTestDone, | 1587 return new RunAllAction(true, whenTestDone, |
1365 Array.prototype.slice.call(arguments, 1)); | 1588 Array.prototype.slice.call(arguments, 1)); |
1366 } | 1589 } |
1367 | 1590 |
1368 // Exports. | 1591 // Exports. |
1369 testing.Test = Test; | 1592 testing.Test = Test; |
1370 exports.testDone = testDone; | 1593 exports.testDone = testDone; |
1594 exports.accessibilityIssuesAreErrors = accessibilityIssuesAreErrors; | |
1371 exports.assertTrue = assertTrue; | 1595 exports.assertTrue = assertTrue; |
1372 exports.assertFalse = assertFalse; | 1596 exports.assertFalse = assertFalse; |
1373 exports.assertGE = assertGE; | 1597 exports.assertGE = assertGE; |
1374 exports.assertGT = assertGT; | 1598 exports.assertGT = assertGT; |
1375 exports.assertEquals = assertEquals; | 1599 exports.assertEquals = assertEquals; |
1376 exports.assertLE = assertLE; | 1600 exports.assertLE = assertLE; |
1377 exports.assertLT = assertLT; | 1601 exports.assertLT = assertLT; |
1378 exports.assertNotEquals = assertNotEquals; | 1602 exports.assertNotEquals = assertNotEquals; |
1379 exports.assertNotReached = assertNotReached; | 1603 exports.assertNotReached = assertNotReached; |
1604 exports.assertAccessibilityOk = assertAccessibilityOk; | |
dmazzoni
2012/12/20 22:05:06
Nit: sort alphabetically
aboxhall
2012/12/20 23:01:41
I agree in principle, but they're actually not in
| |
1380 exports.callFunction = callFunction; | 1605 exports.callFunction = callFunction; |
1381 exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; | 1606 exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; |
1382 exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; | 1607 exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; |
1608 exports.disableAccessibilityChecks = disableAccessibilityChecks; | |
1609 exports.enableAccessibilityChecks = enableAccessibilityChecks; | |
1383 exports.expectTrue = createExpect(assertTrue); | 1610 exports.expectTrue = createExpect(assertTrue); |
1384 exports.expectFalse = createExpect(assertFalse); | 1611 exports.expectFalse = createExpect(assertFalse); |
1385 exports.expectGE = createExpect(assertGE); | 1612 exports.expectGE = createExpect(assertGE); |
1386 exports.expectGT = createExpect(assertGT); | 1613 exports.expectGT = createExpect(assertGT); |
1387 exports.expectEquals = createExpect(assertEquals); | 1614 exports.expectEquals = createExpect(assertEquals); |
1388 exports.expectLE = createExpect(assertLE); | 1615 exports.expectLE = createExpect(assertLE); |
1389 exports.expectLT = createExpect(assertLT); | 1616 exports.expectLT = createExpect(assertLT); |
1390 exports.expectNotEquals = createExpect(assertNotEquals); | 1617 exports.expectNotEquals = createExpect(assertNotEquals); |
1391 exports.expectNotReached = createExpect(assertNotReached); | 1618 exports.expectNotReached = createExpect(assertNotReached); |
1619 exports.expectAccessibilityOk = createExpect(assertAccessibilityOk); | |
1620 exports.getAccessibilityErrors = getAccessibilityErrors; | |
1621 exports.getAccessibilityWarnings = getAccessibilityWarnings; | |
1392 exports.preloadJavascriptLibraries = preloadJavascriptLibraries; | 1622 exports.preloadJavascriptLibraries = preloadJavascriptLibraries; |
1393 exports.registerMessageCallback = registerMessageCallback; | 1623 exports.registerMessageCallback = registerMessageCallback; |
1394 exports.registerMockGlobals = registerMockGlobals; | 1624 exports.registerMockGlobals = registerMockGlobals; |
1395 exports.registerMockMessageCallbacks = registerMockMessageCallbacks; | 1625 exports.registerMockMessageCallbacks = registerMockMessageCallbacks; |
1396 exports.resetTestState = resetTestState; | 1626 exports.resetTestState = resetTestState; |
1627 exports.runAccessibilityAudit = runAccessibilityAudit; | |
1397 exports.runAllActions = runAllActions; | 1628 exports.runAllActions = runAllActions; |
1398 exports.runAllActionsAsync = runAllActionsAsync; | 1629 exports.runAllActionsAsync = runAllActionsAsync; |
1399 exports.runTest = runTest; | 1630 exports.runTest = runTest; |
1400 exports.runTestFunction = runTestFunction; | 1631 exports.runTestFunction = runTestFunction; |
1401 exports.SaveMockArguments = SaveMockArguments; | 1632 exports.SaveMockArguments = SaveMockArguments; |
1402 exports.DUMMY_URL = DUMMY_URL; | 1633 exports.DUMMY_URL = DUMMY_URL; |
1403 exports.TEST = TEST; | 1634 exports.TEST = TEST; |
1404 exports.TEST_F = TEST_F; | 1635 exports.TEST_F = TEST_F; |
1636 exports.RUNTIME_TEST_F = TEST_F; | |
1405 exports.GEN = GEN; | 1637 exports.GEN = GEN; |
1406 exports.GEN_INCLUDE = GEN_INCLUDE; | 1638 exports.GEN_INCLUDE = GEN_INCLUDE; |
1407 exports.WhenTestDone = WhenTestDone; | 1639 exports.WhenTestDone = WhenTestDone; |
1408 | 1640 |
1409 // Import the Mock4JS helpers. | 1641 // Import the Mock4JS helpers. |
1410 Mock4JS.addMockSupport(exports); | 1642 Mock4JS.addMockSupport(exports); |
1411 })(this); | 1643 })(this); |
OLD | NEW |