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

Unified Diff: LayoutTests/fast/forms/select/popup-menu-mouse-operations.html

Issue 736883002: Implement <select> Popup Menu using PagePopup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed tests for mac 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
Index: LayoutTests/fast/forms/select/popup-menu-mouse-operations.html
diff --git a/LayoutTests/fast/forms/select/popup-menu-mouse-operations.html b/LayoutTests/fast/forms/select/popup-menu-mouse-operations.html
new file mode 100644
index 0000000000000000000000000000000000000000..c4c09db683f0a138877ad9d983d76690a387cc9e
--- /dev/null
+++ b/LayoutTests/fast/forms/select/popup-menu-mouse-operations.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/common.js"></script>
+<script src="../resources/picker-common.js"></script>
+</head>
+<body>
+<select id="menu">
+ <option>foo</option>
+ <option selected>bar</option>
+ <option>baz</option>
+</select>
+<script>
+var menuElement = document.getElementById('menu');
+var picker = null;
+openPicker(menuElement, function () {
+ picker = window.internals.pagePopupWindow.global.picker;
+ shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('menuElement.value', 'bar');
+
+ hoverOverElement(picker._selectElement.children[0]);
+ shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('menuElement.value', 'bar');
+
+ hoverOverElement(picker._selectElement.children[1]);
+ shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('menuElement.value', 'bar');
+
+ hoverOverElement(menuElement);
+ shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('menuElement.value', 'bar');
+
+ clickElement(picker._selectElement.children[2]);
+ shouldBeNull('window.internals.pagePopupWindow');
+ shouldBeEqualToString('menuElement.value', 'baz');
+
+ finishJSTest();
+}, function () {
+ testFailed('picker didn\'t open')
+ finishJSTest();
+});
+</script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/fast/forms/select/popup-menu-key-operations.html ('k') | LayoutTests/fast/forms/select/popup-menu-position.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698