Index: LayoutTests/fast/forms/input-select-api-support.html |
diff --git a/LayoutTests/fast/forms/input-select-api-support.html b/LayoutTests/fast/forms/input-select-api-support.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f38c1553447c3c8c4f3bcfa19443b55206d7c784 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/input-select-api-support.html |
@@ -0,0 +1,41 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../resources/js-test.js"></script> |
+</head> |
+<body> |
+<input type="email" id="email"> |
+<input type="number" id="number"> |
+<input type="date" id="date"> |
+<input type="datetime-local" id="datetime-local"> |
+<input type="color" id="color"> |
+<input type="file" id="file"> |
+<script> |
+description('Test to show select() support for Email, Number, Date/Time, Color and File. It throws only for selection() API'); |
+ |
+var id = document.getElementById('email'); |
+shouldBe('id.select()', ''); |
tkent
2014/11/07 00:22:32
This should be |shouldNotThrow('document.getElemen
Habib Virji
2014/11/07 13:30:10
Done.
|
+shouldThrow('id.selectionStart()'); |
tkent
2014/11/07 00:22:32
Please remove this line, and add tests for missing
Habib Virji
2014/11/07 13:30:10
Done.
|
+ |
+id = document.getElementById('number'); |
+shouldBe('id.select()', ''); |
+shouldThrow('id.selectionStart()'); |
+ |
+id = document.getElementById('date'); |
+shouldBe('id.select()', ''); |
+shouldThrow('id.selectionStart()'); |
+ |
+id = document.getElementById('datetime-local'); |
+shouldBe('id.select()', ''); |
+shouldThrow('id.selectionStart()'); |
+ |
tkent
2014/11/07 00:22:32
Please add tests for <input type=month/time/week>.
Habib Virji
2014/11/07 13:30:10
Done.
|
+id = document.getElementById('color'); |
+shouldBe('id.select()', ''); |
+shouldThrow('id.selectionStart()'); |
+ |
+id = document.getElementById('file'); |
+shouldBe('id.select()', ''); |
+shouldThrow('id.selectionStart()'); |
+</script> |
+</body> |
+</html> |