Changeset 277212 in webkit
- Timestamp:
- May 7, 2021 4:59:38 PM (15 months ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Models/AuditTestCase.js (modified) (1 diff)
-
UserInterface/NonMinified/DefaultAudits.js (modified) (1 diff)
-
UserInterface/Views/CreateAuditPopover.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r276975 r277212 1 2021-05-07 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: Default source for new test cases is minified 4 https://bugs.webkit.org/show_bug.cgi?id=225546 5 6 Reviewed by Devin Rousso. 7 8 Move the placeholder test code to `WI.DefaultAudits` as part of the non-minified sources so that new audit test 9 cases do not have their default placeholder script minified. This also allows us to remove 10 `WI.AuditTestCase.stringifyFunction` as it is no longer needed. 11 12 * UserInterface/Models/AuditTestCase.js: 13 (WI.AuditTestCase.stringifyFunction): Deleted. 14 * UserInterface/NonMinified/DefaultAudits.js: 15 (WI.DefaultAudits.newAuditPlaceholder): 16 * UserInterface/Views/CreateAuditPopover.js: 17 (WI.CreateAuditPopover.prototype.dismiss): 18 (WI.CreateAuditPopover.prototype.dismiss.const.placeholderTestFunction): Deleted. 19 1 20 2021-05-04 Devin Rousso <drousso@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js
r276616 r277212 78 78 } 79 79 80 static stringifyFunction(func, indentLevel)81 {82 let string = func.toString();83 84 // Remove spaces to make the function look unindented.85 string = string.replaceAll(new RegExp(`^ {${indentLevel}}`, "gm"), "");86 87 // Replace remaining indentations with the user set indent string.88 string = string.replaceAll(/^ /gm, WI.indentString());89 90 return string;91 }92 93 80 // Public 94 81 -
trunk/Source/WebInspectorUI/UserInterface/NonMinified/DefaultAudits.js
r276680 r277212 680 680 return {level: domNodes.length ? "fail" : "pass", domNodes, domAttributes: ["aria-hidden"]}; 681 681 }; 682 683 WI.DefaultAudits.newAuditPlaceholder = function() { 684 let result = { 685 level: "pass", 686 }; 687 return result; 688 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/CreateAuditPopover.js
r266317 r277212 87 87 dismiss() 88 88 { 89 const placeholderTestFunction = function() { 90 let result = { 91 level: "pass", 92 }; 93 return result; 94 }; 95 const placeholderTestFunctionString = WI.AuditTestCase.stringifyFunction(placeholderTestFunction, 8); 89 const placeholderTestFunctionString = WI.DefaultAudits.newAuditPlaceholder.toString(); 96 90 97 91 let type = this._typeSelectElement.value;
Note: See TracChangeset
for help on using the changeset viewer.