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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLBodyElement/body-legacy-colors.html

Issue 1921823006: Fix parsing of <body link vlink alink> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/LayoutTests/fast/dom/HTMLBodyElement/body-legacy-colors-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLBodyElement/body-legacy-colors.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLBodyElement/body-legacy-colors.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLBodyElement/body-legacy-colors.html
new file mode 100644
index 0000000000000000000000000000000000000000..b5904fbb0d351f41a388e09e5cbd03ecf9fcf50b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLBodyElement/body-legacy-colors.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script>
+var white = "rgb(255, 255, 255)";
+var green = "rgb(0, 255, 0)";
+var yellow = "rgb(255, 255, 0)";
+var red = "rgb(255, 0, 0)";
+
+function onMouseDown() {
+ if (!window.internals) {
+ console.log('No internals');
+ return;
+ }
+
+ shouldBe("getComputedStyle(window.document.body).backgroundColor", "white");
+
+ vlink.offsetTop;
+ shouldBe("internals.computedStyleIncludingVisitedInfo(vlink).color", "green");
+
+ alink.offsetTop;
+ shouldBe("internals.computedStyleIncludingVisitedInfo(alink).color", "yellow");
+
+ link.offsetTop;
+ shouldBe("internals.computedStyleIncludingVisitedInfo(link).color", "red");
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+function runTest() {
+ if (!window.eventSender) {
+ console.log('No event sender');
+ return;
+ }
+
+ eventSender.mouseMoveTo(alink.offsetLeft + 5, alink.offsetTop + 5);
+ eventSender.mouseDown();
+}
+
+if (window.testRunner)
+ testRunner.waitUntilDone();
+</script>
+</head>
+<body bgcolor="ffffff" link="ffzz" vlink="00ffx" alink="ffff0x" onload="runTest();">
+This should have a white background.
+<a href="" id="vlink">This text should be green.</a>
+<a href="javascript:" id="alink" onmousedown="onMouseDown()">This text should be yellow while active.</a>
+<a href="#" id="link" >This text should be red.</a>
+</body>
+</html>
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/LayoutTests/fast/dom/HTMLBodyElement/body-legacy-colors-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698