blob: 360c177aef1c9ce1bd848f6e6a1e2bc0c5d52e84 [file] [log] [blame]
/*
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @description
*/
import "dart:html";
import "../../testcommon.dart";
main() {
document.body.setInnerHtml('''
<p>There are two readonly form control elements below, both required and with some value:
validity.valueMissing should be false in both cases.</p>
<input name="victim" readonly required />
<textarea name="victim" readonly required></textarea>
''', treeSanitizer: new NullTreeSanitizer());
List<Node> v = document.getElementsByName("victim");
shouldBeFalse((v[0] as InputElementBase).validity.valueMissing);
shouldBeFalse((v[1] as InputElementBase).validity.valueMissing);
}