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

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 test case 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..97f3150970ee964691ecc3e7e03cebc515d04f40
--- /dev/null
+++ b/LayoutTests/fast/css/area-computedStyle.html
@@ -0,0 +1,32 @@
+<html>
maheshkk 2014/08/06 21:44:11 Leave a comment with bug ID this test added for.
+<head>
+ <script src="../../resources/js-test.js"></script>
+</head>
+<script>
+function runtest(){
+ if (!window.testRunner)
+ return;
+testRunner.waitUntilDone();
+eventSender.mouseMoveTo(75, 75);
maheshkk 2014/08/06 21:44:11 Indent the code throughout this test case.
+}
+function hoverFunc(){
+ var area = document.getElementById('areaTest');
+ var s = window.getComputedStyle(area,null);
maheshkk 2014/08/06 21:44:11 area and s vars aren't used?
+ var expectedColor = "rgb(0, 0, 255)";
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('areaTest'), null).color", expectedColor);
maheshkk 2014/08/06 21:44:11 you could remove expectedColor too and use the str
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+<style type="text/css">
+area:hover{
+ color:blue;
+}
+</style>
maheshkk 2014/08/06 21:44:11 Move style and script tag either inside <head> or
+<body id="body" onload="runtest()">
+ <map id="samsung" name="imagemap1">
+ <area id="areaTest", onmouseover="hoverFunc()" shape="rect" coords="0, 0, 100, 100" href="http://www.samsung.com" title="Link1" />
maheshkk 2014/08/06 21:44:11 You can remove some noise here, like unneeded id's
+ </map>
+ <img id="img1" src="../../accessibility/resources/cake.png" border="0" align="left" usemap="#imagemap1" />
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698