dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.1k stars 1.56k forks source link

[html] InputElement.stepUp(), stepDown() should throw on unsupported types #21282

Open DartBot opened 9 years ago

DartBot commented 9 years ago

This issue was originally filed by Ilya.Va...@gmail.com


Found during port of layout tests.

import "dart:html"; import "../../testcommon.dart"; import "../../../Utils/async_utils.dart";

_shouldThrow(func())   => shouldThrow(func, (e) => e is DomException && e.name == DomException.INVALID_STATE);

main() {   var input = document.createElement('input');

  input.type = 'text';   input.step = "3";   input.min = "";   input.max = "";   input.value = "2";   _shouldThrow(() => input.stepDown()); // does not throw   _shouldThrow(() => input.stepDown(0));   _shouldThrow(() => input.stepUp()); // does not throw   _shouldThrow(() => input.stepUp(0)); }

dgrove commented 9 years ago

Added Library-Html, Triaged labels.

alan-knight commented 9 years ago

Removed Priority-Unassigned label. Added Priority-Medium, Area-Library, Accepted labels.