Chromium Code Reviews| Index: LayoutTests/fast/forms/ua-shadow-select-all-crash.html |
| diff --git a/LayoutTests/fast/forms/ua-shadow-select-all-crash.html b/LayoutTests/fast/forms/ua-shadow-select-all-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..59dfa150ea15b12c43833cdda346c423fe6f19a0 |
| --- /dev/null |
| +++ b/LayoutTests/fast/forms/ua-shadow-select-all-crash.html |
| @@ -0,0 +1,18 @@ |
| +<html> |
|
yosin_UTC9
2015/01/14 01:33:44
nit: Could you add "<!DOCTYPE html>" to make Blink
keishi
2015/01/16 05:08:41
Done.
|
| +<body> |
| +<button type="button" id="button1">FOOO</button> |
| + |
| +<script> |
| +var button1 = document.getElementById('button1'); |
| +var input1=document.createElement('input'); |
|
yosin_UTC9
2015/01/14 01:33:44
nit: Please put spaces around |=|
keishi
2015/01/16 05:08:41
Done.
|
| +button1.appendChild(input1); |
|
yosin_UTC9
2015/01/14 01:33:44
Can we put <input type="week"> in markup rather th
keishi
2015/01/16 05:08:41
Done. Changing the type later is the important bit
|
| +input1.setSelectionRange(0); |
| +input1.type='week'; |
|
yosin_UTC9
2015/01/14 01:33:44
nit: Please put spaces around |=|
keishi
2015/01/16 05:08:41
Done.
|
| +var oSelection = window.getSelection(); |
| +document.execCommand('SelectAll', false, false); |
|
yosin_UTC9
2015/01/14 01:33:44
nit: We need first argument only.
keishi
2015/01/16 05:08:41
Done.
|
| +oSelection.deleteFromDocument(); |
| +input1.value = 'foo'; |
| +</script> |
| +<p>Pass if it doesn't crash</p> |
| +</body> |
| +</html> |