anchor.diff:      }));
     });
   
  -  /* An input of type number can only have assigned to its [value] field
  -   * a string that represents a valid number. Any attempts to assign
  -   * any other string will have no effect on the [value] field.
  -   * 
  -   * This function simulates typing the given string value into the input
  -   * field regardless of whether it represents a valid number or not. It
  -   * has the side-effect of setting the window focus to the input.
  +  /* 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 setNumberInputValue(InputElement input, String value) {
  +  void simulateTypingText(InputElement input, String text) {
       input..focus()
  -      ..dispatchEvent(new TextEvent('textInput', data: value));
  +      ..dispatchEvent(new TextEvent('textInput', data: text));
     }
     
     describe('type="number" like', () {
  
positive.code:       var element = _.compile('<input type="number" ng-model="$modelFieldName">');
        dom.querySelector('body').append(element);
  
        var ten = '1e1';
        setNumberInputValue(element, ten);      
        _.triggerEvent(element, 'change');
        expect(_.rootScope.context[modelFieldName]).toEqual(10);
        // Ensure that the input text is literally the same
        element.selectionStart = 0;
        // Set the selectionEnd to one beyond ten.length in
        // case angular added some extra text.
        element.selectionEnd = ten.length + 1;
        expect(dom.window.getSelection().toString()).toEqual(ten);
      }));
  
      it('should update input value from model', inject(() {
  
negative.code:       var element = _.compile('<input type="number" ng-model="$modelFieldName">');
        dom.querySelector('body').append(element);
  
        // This test will progressively enter the text '1e1'
        // '1' is a valid number.
        // '1e' is not a valid number.
        // '1e1' is again a valid number (with an exponent)
        
        simulateTypingText(element, '1');
        _.triggerEvent(element, 'change');
        expect(element.value).toEqual('1');
        expect(_.rootScope.context[modelFieldName]).toEqual(1);
  
        simulateTypingText(element, 'e');
        // Because the text is not a valid number, the element value is empty.
        expect(element.value).toEqual('');
        // When the input is invalid, the model is [double.NAN]:
        _.triggerEvent(element, 'change');
        expect(_.rootScope.context[modelFieldName].isNaN).toBeTruthy();
  
        simulateTypingText(element, '1');
        _.triggerEvent(element, 'change');
        expect(element.value).toEqual('1e1');
        expect(_.rootScope.context[modelFieldName]).toEqual(10);
      }));
  
      it('should not reformat user input to equivalent numeric representation', inject((Injector i) {
  