anchor.diff:          var modelFieldName = 'modelForNumFromInvalid1';
           var element = _.compile('<input type="number" ng-model="$modelFieldName">');
           dom.querySelector('body').append(element);
  +
  +        if (!simulateTypingTextWithConfirmation(element, '1')) return; // skip test.
  +        element.value = ''; // reset input
   
           // This test will progressively enter the text '1e1'
           // '1' is a valid number.
  
positive.code:       });
      });
  
      /* This function simulates typing the given text into the input
       * field. The text will be added wherever the insertion point
       * happens to be. This method has as side-effect to set the
       * focus on the input (without setting the focus, the text
       * dispatch may not work).
       */
      void simulateTypingText(InputElement input, String text) {
        input..focus()..dispatchEvent(new TextEvent('textInput', data: text));
      }
  
      describe('type="number" or type="range"', () {
  
        it('should update model from the input value for type=number', () {
  
negative.code:         var modelFieldName = 'modelForNumFromInvalid2';
          var element = _.compile('<input type="number" ng-model="$modelFieldName">');
          dom.querySelector('body').append(element);
  
          if (!simulateTypingTextWithConfirmation(element, '1')) return; // skip test.
          element.value = ''; // reset input
  
          simulateTypingText(element, '1e-1');
          expect(element.value).toEqual('1e-1');
  