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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/dom/elements/global-attributes/id-attribute.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (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
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/dom/elements/global-attributes/id-attribute.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/dom/elements/global-attributes/id-attribute.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/dom/elements/global-attributes/id-attribute.html
deleted file mode 100644
index 041a14a1030359ee409cc177d9137e5bf9219597..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/dom/elements/global-attributes/id-attribute.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>The id attribute</title>
-<meta charset=utf8>
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-id-attribute">
-<style>
-
-#abcd {
- position: absolute;
- z-index: 1;
-}
-
-#ABCD {
- position: absolute;
- z-index: 2;
-}
-
-#a\ b {
- position: absolute;
- z-index: 3;
-}
-
-#xyz {
- position: absolute;
- z-index: 4;
-}
-
-#foobar {
- position: absolute;
- z-index: 5;
-}
-
-#åèiöú {
- position: absolute;
- z-index: 6;
-}
-
-</style>
-</head>
-<body>
-<h1>The id attribute</h1>
-<div id="log"></div>
-<i id="abcd"></i>
-<i id="ABCD"></i>
-<i id="a b"></i>
-<i id="åèiöú"></i>
-<script src="../../../../../../resources/testharness.js"></script>
-<script src="../../../../../../resources/testharnessreport.js"></script>
-<script>
- // id is associated for purposes of getElementById
- test(function() {
- assert_equals(document.getElementById("abcd"), document.getElementsByTagName("i")[0]);
- }, "User agents must associate the element with an id value for purposes of getElementById.");
-
- test(function() {
- assert_equals(document.getElementById("ABCD"), document.getElementsByTagName("i")[1]);
- }, "Association is exact and therefore case-sensitive for getElementById.");
-
- test(function() {
- assert_equals(document.getElementById("a b"), document.getElementsByTagName("i")[2]);
- }, "Spaces are allowed in an id and still make an association for getElementByID.");
-
- test(function() {
- assert_equals(document.getElementById("åèiöú"), document.getElementsByTagName("i")[3]);
- }, "Non-ASCII is allowed in an id and still make an association for getElementById.");
-
-
- // id is associated for purposes of CSS
- test(function() {
- assert_equals(document.defaultView.getComputedStyle(document.getElementById("abcd"), false).zIndex, "1");
- }, "User agents must associate the element with an id value for purposes of CSS.");
-
- test(function() {
- assert_equals(document.defaultView.getComputedStyle(document.getElementById("ABCD"), false).zIndex, "2");
- }, "Association for CSS is exact and therefore case-sensitive.");
-
- test(function() {
- assert_equals(document.defaultView.getComputedStyle(document.getElementById("a b"), false).zIndex, "3");
- }, "Spaces are allowed in an id and still make an association.");
-
- test(function() {
- assert_equals(document.defaultView.getComputedStyle(document.getElementById("åèiöú"), false).zIndex, "6");
- }, "Non-ASCII is allowed in an id and still make an association for CSS.");
-
-
- // id IDL attribute reflects the content attribute
- var firstSpan = document.getElementById("abcd");
-
- test(function() {
- assert_equals(firstSpan.id, "abcd");
- }, "The id IDL attribute must reflect the id content attribute, for getting.");
-
- test(function() {
- firstSpan.id = "xyz";
- assert_equals(firstSpan.getAttribute("id"), "xyz");
- }, "The id IDL attribute must reflect the id content attribute, for setting via IDL attribute.");
-
- test(function() {
- assert_equals(document.getElementById("xyz"), firstSpan);
- }, "After setting id via id attribute, getElementById find the element by the new id.");
-
- test(function() {
- assert_equals(document.getElementById("abcd"), null);
- }, "After setting id via id attribute, getElementById doesn't find the element by the old id.");
-
- test(function() {
- assert_equals(document.defaultView.getComputedStyle(firstSpan, false).zIndex, "4");
- }, "After setting id via id attribute, CSS association is via the new ID.");
-
- test(function() {
- firstSpan.setAttribute("id", "foobar");
- assert_equals(firstSpan.id, "foobar");
- }, "The id IDL attribute must reflect the id content attribute, for setting via setAttribute.");
-
- test(function() {
- assert_equals(document.getElementById("foobar"), firstSpan);
- }, "After setting id via setAttribute attribute, getElementById find the element by the new id.");
-
- test(function() {
- assert_equals(document.getElementById("xyz"), null);
- }, "After setting id via setAttribute attribute, getElementById doesn't find the element by the old id.");
-
- test(function() {
- assert_equals(document.defaultView.getComputedStyle(firstSpan, false).zIndex, "5");
- }, "After setting id via setAttribute attribute, CSS association is via the new ID.");
-
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698