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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/change-title-enabling-alternate.html

Issue 2337193004: Setting the link title may change the preferred set. (Closed)
Patch Set: Rebased Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <link rel="stylesheet alternate" href="data:text/css,p { color:green }" title="p refer">
5 <link rel="stylesheet alternate" href="data:text/css,p { color:red }" title="not preferred">
6 <link id="l1" rel="stylesheet" title="notpreferred">
7 <link id="l2" rel="stylesheet" href title="notpreferred">
8 <link id="l3" rel="stylesheet" href="" title="notpreferred">
9 <link id="l4" rel="icon" href="data:text/css," title="notpreferred">
10 <link id="l5" rel="stylesheet" href="data:text/css,">
11 <p id="p1">This text should be green</p>
12 <script>
13 test(() => {
14 assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
15 }, "Check that #p1 is initially black.");
16
17 test(() => {
18 l1.setAttribute("title", "prefer");
19 assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
20 }, "Do not set preferred set when href missing.");
21
22 test(() => {
23 l2.setAttribute("title", "prefer");
24 assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
25 }, "Do not set preferred set when href has no value.");
26
27 test(() => {
28 l3.setAttribute("title", "prefer");
29 assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
30 }, "Do not set preferred set when href has empty value.");
31
32 test(() => {
33 l4.setAttribute("title", "prefer");
34 assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
35 }, "Do not set preferred set for rel=icon.");
36
37 test(() => {
38 l5.setAttribute("title", "prefer");
39 assert_equals(getComputedStyle(p1).color, "rgb(0, 128, 0)");
40 }, "Setting the title attribute set the preferred set.");
41 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698