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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script>
6 var white = "rgb(255, 255, 255)";
7 var green = "rgb(0, 255, 0)";
8 var yellow = "rgb(255, 255, 0)";
9 var red = "rgb(255, 0, 0)";
10
11 function onMouseDown() {
12 if (!window.internals) {
13 console.log('No internals');
14 return;
15 }
16
17 shouldBe("getComputedStyle(window.document.body).backgroundColor", "white");
18
19 vlink.offsetTop;
20 shouldBe("internals.computedStyleIncludingVisitedInfo(vlink).color", "green" );
21
22 alink.offsetTop;
23 shouldBe("internals.computedStyleIncludingVisitedInfo(alink).color", "yellow ");
24
25 link.offsetTop;
26 shouldBe("internals.computedStyleIncludingVisitedInfo(link).color", "red");
27
28 if (window.testRunner)
29 testRunner.notifyDone();
30 }
31
32 function runTest() {
33 if (!window.eventSender) {
34 console.log('No event sender');
35 return;
36 }
37
38 eventSender.mouseMoveTo(alink.offsetLeft + 5, alink.offsetTop + 5);
39 eventSender.mouseDown();
40 }
41
42 if (window.testRunner)
43 testRunner.waitUntilDone();
44 </script>
45 </head>
46 <body bgcolor="ffffff" link="ffzz" vlink="00ffx" alink="ffff0x" onload="runTest( );">
47 This should have a white background.
48 <a href="" id="vlink">This text should be green.</a>
49 <a href="javascript:" id="alink" onmousedown="onMouseDown()">This text should be yellow while active.</a>
50 <a href="#" id="link" >This text should be red.</a>
51 </body>
52 </html>
OLDNEW
« 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