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

Unified Diff: LayoutTests/fast/forms/color/input-color-chooser-shown.html

Issue 15376006: Added window.internals.isColorChooserShown() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/color/input-color-chooser-shown.html
diff --git a/LayoutTests/fast/forms/color/input-color-chooser-shown.html b/LayoutTests/fast/forms/color/input-color-chooser-shown.html
new file mode 100644
index 0000000000000000000000000000000000000000..e9ec494fb180880feec50ac5afdb088c10cc1c1a
--- /dev/null
+++ b/LayoutTests/fast/forms/color/input-color-chooser-shown.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+<div id="host" tabindex="1">
+ <input id="target" type="color" value="#000000">
+</div>
+<script>
+
+if (window.eventSender) {
+ window.jsTestIsAsync = true
+
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop + target.offsetHeight / 2);
tkent 2013/05/21 05:20:43 You can include ../resources/common.js and use cli
Hajime Morrita 2013/05/21 06:11:23 Cool!
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ shouldBeTrue("internals.isColorChooserShown(target)");
+
+ target.style.display = "none";
+
+ var nwait = 5;
+ function testClosed()
+ {
+ nwait--;
+ if (0 < nwait)
+ return window.setTimeout(testClosed, 0);
+ shouldBeFalse("internals.isColorChooserShown(target)");
+ finishJSTest();
+ }
+
+ window.setTimeout(testClosed, 0);
+}
+
+</script>
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698