Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: LayoutTests/fast/forms/select-popup-close-no-crash.html

Issue 920433002: Gracefully handle a disconnected popup menu client on disposing open popup. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select-popup-close-no-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/select-popup-close-no-crash.html
diff --git a/LayoutTests/fast/forms/select-popup-close-no-crash.html b/LayoutTests/fast/forms/select-popup-close-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..830a032b06846b3577b85f89bf2962f2f34dae43
--- /dev/null
+++ b/LayoutTests/fast/forms/select-popup-close-no-crash.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<body>
+<select id="menu">
+<option>foo</option>
+<option>bar</option>
+</select>
+<form action="data:text/html,&lt;script&gt;console.log('Check that first disconnecting then closing a page popup does not crash.'); console.log('PASS: no crash');testRunner.notifyDone();&lt;/script&gt;" id="form1">
+</form>
+<script>
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+function sendKey(input, keyName, ctrlKey, altKey) {
+ var event = document.createEvent('KeyboardEvent');
+ event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName, 0, ctrlKey, altKey);
+ input.dispatchEvent(event);
+}
+function openPicker(menu) {
keishi 2015/02/11 11:44:08 We have this function in fast/forms/resources/pick
+ window.moveTo();
+ menu.offsetTop;
+ sendKey(menu, "Down", false, true);
+}
+
+function runTest() {
+ openPicker(document.getElementById('menu'));
+ setTimeout(function() {document.getElementById('form1').submit();}, 0);
+}
+window.onload = runTest;
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select-popup-close-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698