mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:16:51 +00:00
53296536de
Now that TextInputElement.value accepts a nullable value, this test can be added back to test null behavior. Change-Id: Ia17554314f25c5d09e113bb5c9c0a6b6f1cb1c03 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143190 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com>
27 lines
666 B
Dart
27 lines
666 B
Dart
// Copyright (c) 2020, 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.
|
|
|
|
import 'dart:html';
|
|
|
|
import 'package:expect/minitest.dart';
|
|
|
|
@pragma('dart2js:noInline')
|
|
returnNothing() {}
|
|
|
|
// Gets an undefined value from JS.
|
|
dynamic _undefined = returnNothing();
|
|
|
|
main() {
|
|
test('valueSetNull', () {
|
|
final e = new TextInputElement();
|
|
e.value = null;
|
|
expect(e.value, '');
|
|
});
|
|
test('valueSetNullProxy', () {
|
|
final e = new TextInputElement();
|
|
e.value = _undefined;
|
|
expect(e.value, 'undefined');
|
|
});
|
|
}
|