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

Unified Diff: LayoutTests/fast/css/area-computedStyle.html

Issue 442563002: Fix getComputedStyle() for area element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix code style Created 6 years, 4 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/css/area-computedStyle.html
diff --git a/LayoutTests/fast/css/area-computedStyle.html b/LayoutTests/fast/css/area-computedStyle.html
new file mode 100644
index 0000000000000000000000000000000000000000..de8b87afc9c8ac7fffedead4baa46ce7d1a74391
--- /dev/null
+++ b/LayoutTests/fast/css/area-computedStyle.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ area:hover {
+ color: blue;
+ }
+ </style>
+</head>
+<body onload="runtest()">
Inactive 2014/08/07 15:34:22 runTest()
+ <map name="imagemap1">
+ <area id="areaTest" onmouseover="hoverFunc()" shape="rect" coords="0, 0, 100, 100" />
+ </map>
+ <img src="resources/greenbox-100px.png" border="0" align="left" usemap="#imagemap1" />
+ <script src="../../resources/js-test.js"></script>
Inactive 2014/08/07 15:34:22 Since you have a head, can you please move this to
+ <script>
Inactive 2014/08/07 15:34:22 It seems like all this <script> could have stayed
+ description("Test return value of getComputedStyle() for area tag.");
+ window.jsTestIsAsync = true;
+ var areatag = document.getElementById("areaTest");
Inactive 2014/08/07 15:34:22 this is not a tag, so either "area" or "areaElemen
+
+ function runtest() {
Inactive 2014/08/07 15:34:22 "runTest()"
+ if(window.eventSender) {
Inactive 2014/08/07 15:34:22 missing space after "if"
+ var target = document.getElementById("areaTest");
+ var x = target.offsetParent.offsetLeft + target.offsetLeft + target.offsetWidth / 2;
+ var y = target.offsetParent.offsetTop + target.offsetTop + target.offsetHeight / 2;
+ eventSender.mouseMoveTo(x, y);
+ }
+ }
+
+ function hoverFunc() {
Inactive 2014/08/07 15:34:22 maybe onAreaHover() ?
+ shouldBeEqualToString("window.getComputedStyle(areatag, null).color", "rgb(0, 0, 255)");
+ finishJSTest();
+ }
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698