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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/change-title-enabling-alternate.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/change-title-enabling-alternate.html b/third_party/WebKit/LayoutTests/fast/css/change-title-enabling-alternate.html
new file mode 100644
index 0000000000000000000000000000000000000000..3b84c4be7d6d454fbde1230247f5e555093694ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/change-title-enabling-alternate.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<link rel="stylesheet alternate" href="data:text/css,p { color:green }" title="prefer">
+<link rel="stylesheet alternate" href="data:text/css,p { color:red }" title="notpreferred">
+<link id="l1" rel="stylesheet" title="notpreferred">
+<link id="l2" rel="stylesheet" href title="notpreferred">
+<link id="l3" rel="stylesheet" href="" title="notpreferred">
+<link id="l4" rel="icon" href="data:text/css," title="notpreferred">
+<link id="l5" rel="stylesheet" href="data:text/css,">
+<p id="p1">This text should be green</p>
+<script>
+ test(() => {
+ assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
+ }, "Check that #p1 is initially black.");
+
+ test(() => {
+ l1.setAttribute("title", "prefer");
+ assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
+ }, "Do not set preferred set when href missing.");
+
+ test(() => {
+ l2.setAttribute("title", "prefer");
+ assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
+ }, "Do not set preferred set when href has no value.");
+
+ test(() => {
+ l3.setAttribute("title", "prefer");
+ assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
+ }, "Do not set preferred set when href has empty value.");
+
+ test(() => {
+ l4.setAttribute("title", "prefer");
+ assert_equals(getComputedStyle(p1).color, "rgb(0, 0, 0)");
+ }, "Do not set preferred set for rel=icon.");
+
+ test(() => {
+ l5.setAttribute("title", "prefer");
+ assert_equals(getComputedStyle(p1).color, "rgb(0, 128, 0)");
+ }, "Setting the title attribute set the preferred set.");
+</script>
« 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