Index: LayoutTests/fast/dom/shadow/input-color-in-content.html |
diff --git a/LayoutTests/fast/dom/shadow/input-color-in-content.html b/LayoutTests/fast/dom/shadow/input-color-in-content.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..59147024fe98de52ce9f551990083bb4872f3567 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/shadow/input-color-in-content.html |
@@ -0,0 +1,45 @@ |
+<!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> |
+ |
+shadow = host.webkitCreateShadowRoot(); |
+shadow.innerHTML = "<content></content>"; |
+jsTestIsAsync = true; |
+ |
+function waitUntilShown(then) |
+{ |
+ if (!testRunner.isChooserShown()) |
+ return window.setTimeout(function() { waitUntilShown(then); }, 0); |
+ then(); |
+} |
+ |
+function ensureOpeningFor(count, then) |
+{ |
+ shouldBeTrue("testRunner.isChooserShown()"); |
+ if (count) |
+ return window.setTimeout(function() { ensureOpeningFor(count -1, then); }, 0); |
+ then(); |
+} |
+ |
+if (window.eventSender) { |
+ shouldBeFalse("testRunner.isChooserShown()"); |
+ eventSender.dragMode = false; |
+ eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop + target.offsetHeight / 2); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ |
+ waitUntilShown(function() { |
+ testRunner.setWindowIsKey(false); // This triggers a style recalc. |
+ ensureOpeningFor(10, finishJSTest); // Try several times to ensure nothing wrong happens asynchronously. |
+ }); |
+} |
+ |
+</script> |
+<script src="../../../fast/js/resources/js-test-post.js"></script> |
+</body> |
+</html> |