fix: Fix compilation errors under Closure's strict mode (#6073)

* fix: Fix errors under strict compilation.

* fix: Fix tests that referenced properties converted to data attributes.

* fix: Incorporate feedback on resolving compiler errors.

* refactor: Revert changes to skew and translate attributes.

* refactor: Introduce LegacyContextMenuOption type to correspond to documented fields.

* refactor: Introduce PathLeftShape and PathDownShape vs casting to PuzzleTab/Notch.

* chore: Added nullability modifiers to type annotations.

* refactor: Export FlyoutItem directly.

* chore: clang-format renderers/zelos/drawer.js.
This commit is contained in:
Aaron Dodson
2022-04-19 14:17:17 -07:00
committed by GitHub
parent b0612da6f3
commit edc2a5cd0c
58 changed files with 758 additions and 369 deletions

View File

@@ -12,13 +12,13 @@ goog.addDependency('../../core/block.js', ['Blockly.Block'], ['Blockly.ASTNode',
goog.addDependency('../../core/block_animations.js', ['Blockly.blockAnimations'], ['Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/block_drag_surface.js', ['Blockly.BlockDragSurfaceSvg'], ['Blockly.utils.Coordinate', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.svgMath'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/block_dragger.js', ['Blockly.BlockDragger'], ['Blockly.Events.BlockDrag', 'Blockly.Events.BlockMove', 'Blockly.Events.utils', 'Blockly.IBlockDragger', 'Blockly.InsertionMarkerManager', 'Blockly.blockAnimations', 'Blockly.bumpObjects', 'Blockly.common', 'Blockly.registry', 'Blockly.utils.Coordinate', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/block_svg.js', ['Blockly.BlockSvg'], ['Blockly.ASTNode', 'Blockly.Block', 'Blockly.ConnectionType', 'Blockly.ContextMenu', 'Blockly.ContextMenuRegistry', 'Blockly.Events.BlockMove', 'Blockly.Events.Selected', 'Blockly.Events.utils', 'Blockly.FieldLabel', 'Blockly.IASTNodeLocationSvg', 'Blockly.IBoundedElement', 'Blockly.ICopyable', 'Blockly.IDraggable', 'Blockly.MarkerManager', 'Blockly.Msg', 'Blockly.RenderedConnection', 'Blockly.TabNavigateCursor', 'Blockly.Tooltip', 'Blockly.Touch', 'Blockly.blockAnimations', 'Blockly.browserEvents', 'Blockly.common', 'Blockly.config', 'Blockly.constants', 'Blockly.internalConstants', 'Blockly.serialization.blocks', 'Blockly.utils.Coordinate', 'Blockly.utils.Rect', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.svgMath', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/block_svg.js', ['Blockly.BlockSvg'], ['Blockly.ASTNode', 'Blockly.Block', 'Blockly.ConnectionType', 'Blockly.ContextMenu', 'Blockly.ContextMenuRegistry', 'Blockly.Events.BlockMove', 'Blockly.Events.Selected', 'Blockly.Events.utils', 'Blockly.FieldLabel', 'Blockly.IASTNodeLocationSvg', 'Blockly.IBoundedElement', 'Blockly.ICopyable', 'Blockly.IDraggable', 'Blockly.MarkerManager', 'Blockly.Msg', 'Blockly.RenderedConnection', 'Blockly.TabNavigateCursor', 'Blockly.Tooltip', 'Blockly.Touch', 'Blockly.blockAnimations', 'Blockly.browserEvents', 'Blockly.common', 'Blockly.config', 'Blockly.constants', 'Blockly.internalConstants', 'Blockly.serialization.blocks', 'Blockly.utils.Coordinate', 'Blockly.utils.Rect', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.svgMath'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/blockly.js', ['Blockly'], ['Blockly.ASTNode', 'Blockly.BasicCursor', 'Blockly.Block', 'Blockly.BlockDragSurfaceSvg', 'Blockly.BlockDragger', 'Blockly.BlockSvg', 'Blockly.BlocklyOptions', 'Blockly.Bubble', 'Blockly.BubbleDragger', 'Blockly.CollapsibleToolboxCategory', 'Blockly.Comment', 'Blockly.ComponentManager', 'Blockly.Connection', 'Blockly.ConnectionChecker', 'Blockly.ConnectionDB', 'Blockly.ConnectionType', 'Blockly.ContextMenu', 'Blockly.ContextMenuItems', 'Blockly.ContextMenuRegistry', 'Blockly.Css', 'Blockly.Cursor', 'Blockly.DeleteArea', 'Blockly.DragTarget', 'Blockly.Events', 'Blockly.Events.BlockCreate', 'Blockly.Events.FinishedLoading', 'Blockly.Events.Ui', 'Blockly.Events.UiBase', 'Blockly.Events.VarCreate', 'Blockly.Extensions', 'Blockly.Field', 'Blockly.FieldAngle', 'Blockly.FieldCheckbox', 'Blockly.FieldColour', 'Blockly.FieldDropdown', 'Blockly.FieldImage', 'Blockly.FieldLabel', 'Blockly.FieldLabelSerializable', 'Blockly.FieldMultilineInput', 'Blockly.FieldNumber', 'Blockly.FieldTextInput', 'Blockly.FieldVariable', 'Blockly.Flyout', 'Blockly.FlyoutButton', 'Blockly.FlyoutMetricsManager', 'Blockly.Generator', 'Blockly.Gesture', 'Blockly.Grid', 'Blockly.HorizontalFlyout', 'Blockly.IASTNodeLocation', 'Blockly.IASTNodeLocationSvg', 'Blockly.IASTNodeLocationWithBlock', 'Blockly.IAutoHideable', 'Blockly.IBlockDragger', 'Blockly.IBoundedElement', 'Blockly.IBubble', 'Blockly.ICollapsibleToolboxItem', 'Blockly.IComponent', 'Blockly.IConnectionChecker', 'Blockly.IContextMenu', 'Blockly.ICopyable', 'Blockly.IDeletable', 'Blockly.IDeleteArea', 'Blockly.IDragTarget', 'Blockly.IDraggable', 'Blockly.IFlyout', 'Blockly.IKeyboardAccessible', 'Blockly.IMetricsManager', 'Blockly.IMovable', 'Blockly.IPositionable', 'Blockly.IRegistrable', 'Blockly.IRegistrableField', 'Blockly.ISelectable', 'Blockly.ISelectableToolboxItem', 'Blockly.IStyleable', 'Blockly.IToolbox', 'Blockly.IToolboxItem', 'Blockly.Icon', 'Blockly.Input', 'Blockly.InsertionMarkerManager', 'Blockly.Marker', 'Blockly.MarkerManager', 'Blockly.Menu', 'Blockly.MenuItem', 'Blockly.MetricsManager', 'Blockly.Msg', 'Blockly.Mutator', 'Blockly.Names', 'Blockly.Options', 'Blockly.Procedures', 'Blockly.RenderedConnection', 'Blockly.Scrollbar', 'Blockly.ScrollbarPair', 'Blockly.ShortcutItems', 'Blockly.ShortcutRegistry', 'Blockly.TabNavigateCursor', 'Blockly.Theme', 'Blockly.ThemeManager', 'Blockly.Themes', 'Blockly.Toolbox', 'Blockly.ToolboxCategory', 'Blockly.ToolboxItem', 'Blockly.ToolboxSeparator', 'Blockly.Tooltip', 'Blockly.Touch', 'Blockly.TouchGesture', 'Blockly.Trashcan', 'Blockly.VariableMap', 'Blockly.VariableModel', 'Blockly.Variables', 'Blockly.VariablesDynamic', 'Blockly.VerticalFlyout', 'Blockly.Warning', 'Blockly.WidgetDiv', 'Blockly.Workspace', 'Blockly.WorkspaceAudio', 'Blockly.WorkspaceComment', 'Blockly.WorkspaceCommentSvg', 'Blockly.WorkspaceDragSurfaceSvg', 'Blockly.WorkspaceDragger', 'Blockly.WorkspaceSvg', 'Blockly.Xml', 'Blockly.ZoomControls', 'Blockly.blockAnimations', 'Blockly.blockRendering', 'Blockly.blocks', 'Blockly.browserEvents', 'Blockly.bumpObjects', 'Blockly.clipboard', 'Blockly.common', 'Blockly.config', 'Blockly.constants', 'Blockly.dialog', 'Blockly.dropDownDiv', 'Blockly.fieldRegistry', 'Blockly.geras', 'Blockly.inject', 'Blockly.inputTypes', 'Blockly.internalConstants', 'Blockly.minimalist', 'Blockly.registry', 'Blockly.serialization.ISerializer', 'Blockly.serialization.blocks', 'Blockly.serialization.exceptions', 'Blockly.serialization.priorities', 'Blockly.serialization.registry', 'Blockly.serialization.variables', 'Blockly.serialization.workspaces', 'Blockly.thrasos', 'Blockly.uiPosition', 'Blockly.utils', 'Blockly.utils.colour', 'Blockly.utils.deprecation', 'Blockly.utils.global', 'Blockly.utils.svgMath', 'Blockly.utils.toolbox', 'Blockly.zelos'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/blockly_options.js', ['Blockly.BlocklyOptions'], [], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/blocks.js', ['Blockly.blocks'], [], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/browser_events.js', ['Blockly.browserEvents'], ['Blockly.Touch', 'Blockly.utils.global', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/bubble.js', ['Blockly.Bubble'], ['Blockly.IBubble', 'Blockly.Scrollbar', 'Blockly.Touch', 'Blockly.Workspace', 'Blockly.browserEvents', 'Blockly.utils.Coordinate', 'Blockly.utils.Size', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.math', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/bubble_dragger.js', ['Blockly.BubbleDragger'], ['Blockly.Bubble', 'Blockly.ComponentManager', 'Blockly.Events.CommentMove', 'Blockly.Events.utils', 'Blockly.constants', 'Blockly.utils.Coordinate', 'Blockly.utils.svgMath'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/bubble_dragger.js', ['Blockly.BubbleDragger'], ['Blockly.Bubble', 'Blockly.ComponentManager', 'Blockly.Events.CommentMove', 'Blockly.Events.utils', 'Blockly.WorkspaceCommentSvg', 'Blockly.constants', 'Blockly.utils.Coordinate', 'Blockly.utils.svgMath'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/bump_objects.js', ['Blockly.bumpObjects'], ['Blockly.Events.utils', 'Blockly.utils.math'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/clipboard.js', ['Blockly.clipboard'], [], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/comment.js', ['Blockly.Comment'], ['Blockly.Bubble', 'Blockly.Css', 'Blockly.Events.BlockChange', 'Blockly.Events.BubbleOpen', 'Blockly.Events.utils', 'Blockly.Icon', 'Blockly.Warning', 'Blockly.browserEvents', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
@@ -69,9 +69,9 @@ goog.addDependency('../../core/events/utils.js', ['Blockly.Events.utils'], ['Blo
goog.addDependency('../../core/events/workspace_events.js', ['Blockly.Events.FinishedLoading'], ['Blockly.Events.Abstract', 'Blockly.Events.utils', 'Blockly.registry'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/extensions.js', ['Blockly.Extensions'], ['Blockly.FieldDropdown', 'Blockly.utils.parsing'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field.js', ['Blockly.Field'], ['Blockly.Events.BlockChange', 'Blockly.Events.utils', 'Blockly.Gesture', 'Blockly.IASTNodeLocationSvg', 'Blockly.IASTNodeLocationWithBlock', 'Blockly.IKeyboardAccessible', 'Blockly.IRegistrable', 'Blockly.MarkerManager', 'Blockly.Tooltip', 'Blockly.WidgetDiv', 'Blockly.Xml', 'Blockly.browserEvents', 'Blockly.dropDownDiv', 'Blockly.utils.Rect', 'Blockly.utils.Sentinel', 'Blockly.utils.Size', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.parsing', 'Blockly.utils.style', 'Blockly.utils.userAgent', 'Blockly.utils.xml'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_angle.js', ['Blockly.FieldAngle'], ['Blockly.Css', 'Blockly.Field', 'Blockly.FieldTextInput', 'Blockly.WidgetDiv', 'Blockly.browserEvents', 'Blockly.dropDownDiv', 'Blockly.fieldRegistry', 'Blockly.utils.KeyCodes', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.math', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_angle.js', ['Blockly.FieldAngle'], ['Blockly.BlockSvg', 'Blockly.Css', 'Blockly.Field', 'Blockly.FieldTextInput', 'Blockly.WidgetDiv', 'Blockly.browserEvents', 'Blockly.dropDownDiv', 'Blockly.fieldRegistry', 'Blockly.utils.KeyCodes', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.math', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_checkbox.js', ['Blockly.FieldCheckbox'], ['Blockly.Events.BlockChange', 'Blockly.Field', 'Blockly.fieldRegistry', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_colour.js', ['Blockly.FieldColour'], ['Blockly.Css', 'Blockly.Events.BlockChange', 'Blockly.Field', 'Blockly.browserEvents', 'Blockly.dropDownDiv', 'Blockly.fieldRegistry', 'Blockly.utils.KeyCodes', 'Blockly.utils.Size', 'Blockly.utils.aria', 'Blockly.utils.colour', 'Blockly.utils.dom', 'Blockly.utils.idGenerator'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_colour.js', ['Blockly.FieldColour'], ['Blockly.BlockSvg', 'Blockly.Css', 'Blockly.Events.BlockChange', 'Blockly.Field', 'Blockly.browserEvents', 'Blockly.dropDownDiv', 'Blockly.fieldRegistry', 'Blockly.utils.KeyCodes', 'Blockly.utils.Size', 'Blockly.utils.aria', 'Blockly.utils.colour', 'Blockly.utils.dom', 'Blockly.utils.idGenerator'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_dropdown.js', ['Blockly.FieldDropdown'], ['Blockly.Field', 'Blockly.Menu', 'Blockly.MenuItem', 'Blockly.dropDownDiv', 'Blockly.fieldRegistry', 'Blockly.utils.Coordinate', 'Blockly.utils.Svg', 'Blockly.utils.aria', 'Blockly.utils.dom', 'Blockly.utils.parsing', 'Blockly.utils.string', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_image.js', ['Blockly.FieldImage'], ['Blockly.Field', 'Blockly.fieldRegistry', 'Blockly.utils.Size', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.parsing'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/field_label.js', ['Blockly.FieldLabel'], ['Blockly.Field', 'Blockly.fieldRegistry', 'Blockly.utils.dom', 'Blockly.utils.parsing'], {'lang': 'es6', 'module': 'goog'});
@@ -245,7 +245,7 @@ goog.addDependency('../../core/utils/rect.js', ['Blockly.utils.Rect'], [], {'lan
goog.addDependency('../../core/utils/sentinel.js', ['Blockly.utils.Sentinel'], [], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/utils/size.js', ['Blockly.utils.Size'], [], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/utils/string.js', ['Blockly.utils.string'], [], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/utils/style.js', ['Blockly.utils.style'], ['Blockly.utils.Coordinate', 'Blockly.utils.Size'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/utils/style.js', ['Blockly.utils.style'], ['Blockly.utils.Coordinate', 'Blockly.utils.Rect', 'Blockly.utils.Size'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/utils/svg.js', ['Blockly.utils.Svg'], [], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/utils/svg_math.js', ['Blockly.utils.svgMath'], ['Blockly.utils.Coordinate', 'Blockly.utils.Rect', 'Blockly.utils.Size', 'Blockly.utils.deprecation', 'Blockly.utils.global', 'Blockly.utils.style', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/utils/svg_paths.js', ['Blockly.utils.svgPaths'], [], {'lang': 'es6', 'module': 'goog'});

View File

@@ -111,9 +111,9 @@ suite('Angle Fields', function() {
suite('Validators', function() {
setup(function() {
this.field = new Blockly.FieldAngle(1);
this.field.htmlInput_ = Object.create(null);
this.field.htmlInput_.oldValue_ = '1';
this.field.htmlInput_.untypedDefaultValue_ = 1;
this.field.htmlInput_ = document.createElement('input');
this.field.htmlInput_.setAttribute('data-old-value', '1');
this.field.htmlInput_.setAttribute('data-untyped-default-value', '1');
this.stub = sinon.stub(this.field, 'resizeEditor_');
});
teardown(function() {

View File

@@ -187,9 +187,9 @@ suite('Number Fields', function() {
suite('Validators', function() {
setup(function() {
this.field = new Blockly.FieldNumber(1);
this.field.htmlInput_ = Object.create(null);
this.field.htmlInput_.oldValue_ = '1';
this.field.htmlInput_.untypedDefaultValue_ = 1;
this.field.htmlInput_ = document.createElement('input');
this.field.htmlInput_.setAttribute('data-old-value', '1');
this.field.htmlInput_.setAttribute('data-untyped-default-value', '1');
this.stub = sinon.stub(this.field, 'resizeEditor_');
});
teardown(function() {

View File

@@ -105,9 +105,9 @@ suite('Text Input Fields', function() {
suite('Validators', function() {
setup(function() {
this.field = new Blockly.FieldTextInput('value');
this.field.htmlInput_ = Object.create(null);
this.field.htmlInput_.oldValue_ = 'value';
this.field.htmlInput_.untypedDefaultValue_ = 'value';
this.field.htmlInput_ = document.createElement('input');
this.field.htmlInput_.setAttribute('data-old-value', 'value');
this.field.htmlInput_.setAttribute('data-untyped-default-value', 'value');
this.stub = sinon.stub(this.field, 'resizeEditor_');
});
teardown(function() {

View File

@@ -484,11 +484,11 @@ suite('Procedures', function() {
});
test('Simple, Input', function() {
const defInput = this.defBlock.getField('NAME');
defInput.htmlInput_ = Object.create(null);
defInput.htmlInput_.oldValue_ = 'proc name';
defInput.htmlInput_.untypedDefaultValue_ = 'proc name';
defInput.htmlInput_ = document.createElement('input');
defInput.htmlInput_.setAttribute('data-old-value', 'proc name');
defInput.htmlInput_.setAttribute('data-untyped-default-value', 'proc name');
defInput.htmlInput_.value = defInput.htmlInput_.oldValue_ + '2';
defInput.htmlInput_.value = defInput.htmlInput_.getAttribute('data-old-value') + '2';
defInput.onHtmlInputChange_(null);
chai.assert.equal(
this.defBlock.getFieldValue('NAME'), 'proc name2');
@@ -497,9 +497,9 @@ suite('Procedures', function() {
});
test('lower -> CAPS', function() {
const defInput = this.defBlock.getField('NAME');
defInput.htmlInput_ = Object.create(null);
defInput.htmlInput_.oldValue_ = 'proc name';
defInput.htmlInput_.untypedDefaultValue_ = 'proc name';
defInput.htmlInput_ = document.createElement('input');
defInput.htmlInput_.setAttribute('data-old-value', 'proc name');
defInput.htmlInput_.setAttribute('data-untyped-default-value', 'proc name');
defInput.htmlInput_.value = 'PROC NAME';
defInput.onHtmlInputChange_(null);
@@ -512,9 +512,9 @@ suite('Procedures', function() {
this.defBlock.setFieldValue('PROC NAME', 'NAME');
this.callBlock.setFieldValue('PROC NAME', 'NAME');
const defInput = this.defBlock.getField('NAME');
defInput.htmlInput_ = Object.create(null);
defInput.htmlInput_.oldValue_ = 'PROC NAME';
defInput.htmlInput_.untypedDefaultValue_ = 'PROC NAME';
defInput.htmlInput_ = document.createElement('input');
defInput.htmlInput_.setAttribute('data-old-value', 'PROC NAME');
defInput.htmlInput_.setAttribute('data-untyped-default-value', 'PROC NAME');
defInput.htmlInput_.value = 'proc name';
defInput.onHtmlInputChange_(null);
@@ -525,11 +525,11 @@ suite('Procedures', function() {
});
test('Whitespace', function() {
const defInput = this.defBlock.getField('NAME');
defInput.htmlInput_ = Object.create(null);
defInput.htmlInput_.oldValue_ = 'proc name';
defInput.htmlInput_.untypedDefaultValue_ = 'proc name';
defInput.htmlInput_ = document.createElement('input');
defInput.htmlInput_.setAttribute('data-old-value', 'proc name');
defInput.htmlInput_.setAttribute('data-untyped-default-value', 'proc name');
defInput.htmlInput_.value = defInput.htmlInput_.oldValue_ + ' ';
defInput.htmlInput_.value = defInput.htmlInput_.getAttribute('data-old-value') + ' ';
defInput.onHtmlInputChange_(null);
chai.assert.equal(
this.defBlock.getFieldValue('NAME'), 'proc name');
@@ -538,13 +538,13 @@ suite('Procedures', function() {
});
test('Whitespace then Text', function() {
const defInput = this.defBlock.getField('NAME');
defInput.htmlInput_ = Object.create(null);
defInput.htmlInput_.oldValue_ = 'proc name';
defInput.htmlInput_.untypedDefaultValue_ = 'proc name';
defInput.htmlInput_ = document.createElement('input');
defInput.htmlInput_.setAttribute('data-old-value', 'proc name');
defInput.htmlInput_.setAttribute('data-untyped-default-value', 'proc name');
defInput.htmlInput_.value = defInput.htmlInput_.oldValue_ + ' ';
defInput.htmlInput_.value = defInput.htmlInput_.getAttribute('data-old-value') + ' ';
defInput.onHtmlInputChange_(null);
defInput.htmlInput_.value = defInput.htmlInput_.oldValue_ + '2';
defInput.htmlInput_.value = defInput.htmlInput_.getAttribute('data-old-value') + '2';
defInput.onHtmlInputChange_(null);
chai.assert.equal(
this.defBlock.getFieldValue('NAME'), 'proc name 2');
@@ -553,9 +553,9 @@ suite('Procedures', function() {
});
test('Set Empty', function() {
const defInput = this.defBlock.getField('NAME');
defInput.htmlInput_ = Object.create(null);
defInput.htmlInput_.oldValue_ = 'proc name';
defInput.htmlInput_.untypedDefaultValue_ = 'proc name';
defInput.htmlInput_ = document.createElement('input');
defInput.htmlInput_.setAttribute('data-old-value', 'proc name');
defInput.htmlInput_.setAttribute('data-untyped-default-value', 'proc name');
defInput.htmlInput_.value = '';
defInput.onHtmlInputChange_(null);
@@ -568,9 +568,9 @@ suite('Procedures', function() {
});
test('Set Empty, and Create New', function() {
const defInput = this.defBlock.getField('NAME');
defInput.htmlInput_ = Object.create(null);
defInput.htmlInput_.oldValue_ = 'proc name';
defInput.htmlInput_.untypedDefaultValue_ = 'proc name';
defInput.htmlInput_ = document.createElement('input');
defInput.htmlInput_.setAttribute('data-old-value', 'proc name');
defInput.htmlInput_.setAttribute('data-untyped-default-value', 'proc name');
defInput.htmlInput_.value = '';
defInput.onHtmlInputChange_(null);