Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/dom/Selection/selection-crash.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Selection/selection-crash.html b/third_party/WebKit/LayoutTests/fast/dom/Selection/selection-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..08e8fe148af4937d3532314ec506ef4eca10ebcf |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Selection/selection-crash.html |
| @@ -0,0 +1,21 @@ |
| +<!DOCTYPE HTML> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<button id="button"></button> |
| +<iframe id="iframe"></iframe> |
| +<script> |
| +// This is a reproduction case for crbug.com/626750. |
| +async_test((test) => { |
| + button.addEventListener('focus', () => { |
| + iframe.contentWindow.focus(); |
| + }, false); |
|
yosin_UTC9
2016/07/21 06:10:10
nit: Since default value of second parameter is |f
kochi
2016/07/21 06:55:26
Done.
|
| + |
| + button.addEventListener('blur', test.step_func_done(() => { |
| + // This detaches <iframe>. |
| + document.open(); |
| + assert_true(true, "Test did not crash."); |
|
yosin_UTC9
2016/07/21 06:10:10
We should check value of |document.activeElement|
kochi
2016/07/21 06:55:26
What is the intention of wanting to know the then-
yosin_UTC9
2016/07/21 07:22:36
Checking |document.activeElement| leads us |FocusC
kochi
2016/07/21 09:00:33
Originally I thought that this test is for reprodu
|
| + }), false); |
|
yosin_UTC9
2016/07/21 06:10:10
nit: Since default value of second parameter is |f
kochi
2016/07/21 06:55:26
Done.
|
| + |
| + window.addEventListener('load', () => { button.focus(); }, false); |
|
yosin_UTC9
2016/07/21 06:10:10
nit: We can write |window.addEventListener('load',
kochi
2016/07/21 06:55:26
Done.
|
| +}, "focusing on detached frame should not crash"); |
|
yosin_UTC9
2016/07/21 06:10:10
nit: use single quote since other parts in script
kochi
2016/07/21 06:55:26
Done.
|
| +</script> |