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

Unified Diff: LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-key-operations.html

Issue 11364040: Merge 133011 - Calendar picker can flicker when opened from the suggestion picker (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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
Index: LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-key-operations.html
===================================================================
--- LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-key-operations.html (revision 133256)
+++ LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-key-operations.html (working copy)
@@ -89,13 +89,13 @@
openPicker(document.getElementById('date'), test1);
+var expectingDidHideEvent = false;
+
function test1() {
debug('Check that page popup exists.');
shouldBe('popupWindow.pagePopupController.toString()', '"[object PagePopupController]"');
popupWindow.focus();
- popupWindow.removeEventListener("resize", test1, false);
-
debug('Check that up/down arrow keys work.');
shouldBeNull('highlightedEntry()');
eventSender.keyDown('downArrow');
@@ -135,14 +135,10 @@
shouldBe('document.getElementById("date").value', '"2012-03-08"');
debug('Reopen popup.');
- openPicker(document.getElementById('date'));
- popupWindow.addEventListener("resize", test2, false);
+ openPicker(document.getElementById('date'), test2);
}
function test2() {
- popupWindow.removeEventListener("resize", test2, false);
- popupWindow.addEventListener("resize", test3, false);
-
popupWindow.focus();
eventSender.keyDown('pageDown');
@@ -151,12 +147,24 @@
shouldBe('highlightedEntry()', '"@openCalendarPicker"');
debug('Open calendar picker.');
+ expectingDidHideEvent = true;
+ popupWindow.addEventListener("didHide", testDidHide, false);
+ popupWindow.addEventListener("didOpenPicker", test3, false);
eventSender.keyDown('\n');
}
+function testDidHide() {
+ popupWindow.removeEventListener("didHide", testDidHide);
+
+ shouldBeTrue('expectingDidHideEvent');
+ expectingDidHideEvent = false;
+}
+
function test3() {
- popupWindow.removeEventListener("resize", test3, false);
+ popupWindow.removeEventListener("didOpenPicker", test3);
+ shouldBeFalse('expectingDidHideEvent');
+
debug('Confirm calendar picker did open.');
shouldBeTrue('popupWindow.document.getElementById("main").classList.contains("calendar-picker")');

Powered by Google App Engine
This is Rietveld 408576698