anchor.diff:        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);
  +      simulateTypingText(element, '1e-1');
  +      expect(element.value).toEqual('1e-1');
  +      expect(_.rootScope.context[modelFieldName]).toEqual(0.1);
       }));
   
       it('should update input value from model', inject(() {
  
positive.code:       var element = _.compile('<input type="number" ng-model="$modelFieldName">');
        dom.querySelector('body').append(element);
  
        // Subcase: text not representing a valid number.
        var piX = '3.141x';
        setNumberInputValue(element, piX);
        // Because the text is not a valid number, the element value is empty.
        expect(element.value).toEqual('');
        // But the selection can confirm that the text is there:
        element.selectionStart = 0;
        element.selectionEnd = piX.length;
        expect(dom.window.getSelection().toString()).toEqual(piX);
        // When the input is invalid, the model is [double.NAN]:
        _.triggerEvent(element, 'change');
        expect(_.rootScope.context[modelFieldName].isNaN).toBeTruthy();
  
        // Subcase: text representing a valid number (as if the user had erased
        // the trailing 'x').
        num pi = 3.14159;
        setNumberInputValue(element, pi.toString());
        _.triggerEvent(element, 'change');
        expect(element.value).toEqual(pi.toString());
        expect(_.rootScope.context[modelFieldName]).toEqual(pi);
      }));
  
      it('should not reformat user input to equivalent numeric representation', inject((Injector i) {
  
negative.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" like', () {
  