Bug 1475030 [wpt PR 11918] - Move web-platform-tests/html-imports/ into Blink's LayoutTests, a=testonly
authorPhilip Jägenstedt <foolip@chromium.org>
Wed, 25 Jul 2018 15:53:50 +0000
changeset 428976 61715fa4d0c1d95edfa9f57c54d5c53e5a2709fe
parent 428975 ae3c6fe6b9d515f5d5b2bad2c03c26b1256b46cb
child 428977 42d1b3ba971b315331b0d2c9c5c7fa9888b4b6ec
push id67065
push userapavel@mozilla.com
push dateMon, 30 Jul 2018 09:54:59 +0000
treeherderautoland@c8d19a0ec6b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1475030, 11918, 1133161, 575207
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1475030 [wpt PR 11918] - Move web-platform-tests/html-imports/ into Blink's LayoutTests, a=testonly Automatic update from web-platform-testsMove web-platform-tests/html-imports/ into Blink's LayoutTests As discussed on dom-dev: https://groups.google.com/a/chromium.org/d/msg/dom-dev/qfHM4fKckwk/nELu4mvaAwAJ There was already a hello.html + hello-parent.html in LayoutTests, so these are kept and already-in-import-map.html was tweaked slightly to use those instead. There was also an existing hello.css, which was different, but the test (import-attribute.html) doesn't depend on it. Change-Id: Ib97451ff33bae16a75a2c7c703a8bac270910e38 Reviewed-on: https://chromium-review.googlesource.com/1133161 Reviewed-by: Hayato Ito <hayato@chromium.org> Reviewed-by: Takayoshi Kochi <kochi@chromium.org> Commit-Queue: Philip J├Ągenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#575207} -- wpt-commits: a270ae8074cbb78f568af90f511ff143cd7b3eec wpt-pr: 11918
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html-imports/META.yml
testing/web-platform/tests/html-imports/document/document-method-changes.html
testing/web-platform/tests/html-imports/document/resources/body-only.html
testing/web-platform/tests/html-imports/document/resources/test-in-import.html
testing/web-platform/tests/html-imports/fetching/already-in-import-map.html
testing/web-platform/tests/html-imports/fetching/loading-attempt.html
testing/web-platform/tests/html-imports/fetching/resources/async.html
testing/web-platform/tests/html-imports/fetching/resources/dynamic.html
testing/web-platform/tests/html-imports/fetching/resources/hello.html
testing/web-platform/tests/html-imports/fetching/resources/parent-of-hello.html
testing/web-platform/tests/html-imports/html-link-element/import-attribute.html
testing/web-platform/tests/html-imports/html-link-element/resources/body-only-0.html
testing/web-platform/tests/html-imports/html-link-element/resources/body-only-1.html
testing/web-platform/tests/html-imports/html-link-element/resources/body-only-2.html
testing/web-platform/tests/html-imports/html-link-element/resources/hello.css
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -276822,71 +276822,16 @@
      {}
     ]
    ],
    "hr-time/resources/now_frame.html": [
     [
      {}
     ]
    ],
-   "html-imports/META.yml": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/document/resources/body-only.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/document/resources/test-in-import.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/fetching/resources/async.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/fetching/resources/dynamic.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/fetching/resources/hello.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/fetching/resources/parent-of-hello.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/html-link-element/resources/body-only-0.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/html-link-element/resources/body-only-1.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/html-link-element/resources/body-only-2.html": [
-    [
-     {}
-    ]
-   ],
-   "html-imports/html-link-element/resources/hello.css": [
-    [
-     {}
-    ]
-   ],
    "html-longdesc/META.yml": [
     [
      {}
     ]
    ],
    "html-longdesc/README.html": [
     [
      {}
@@ -339789,40 +339734,16 @@
     ]
    ],
    "hr-time/window-worker-timeOrigin.window.js": [
     [
      "/hr-time/window-worker-timeOrigin.window.html",
      {}
     ]
    ],
-   "html-imports/document/document-method-changes.html": [
-    [
-     "/html-imports/document/document-method-changes.html",
-     {}
-    ]
-   ],
-   "html-imports/fetching/already-in-import-map.html": [
-    [
-     "/html-imports/fetching/already-in-import-map.html",
-     {}
-    ]
-   ],
-   "html-imports/fetching/loading-attempt.html": [
-    [
-     "/html-imports/fetching/loading-attempt.html",
-     {}
-    ]
-   ],
-   "html-imports/html-link-element/import-attribute.html": [
-    [
-     "/html-imports/html-link-element/import-attribute.html",
-     {}
-    ]
-   ],
    "html-media-capture/capture_reflect.html": [
     [
      "/html-media-capture/capture_reflect.html",
      {}
     ]
    ],
    "html-media-capture/idlharness.html": [
     [
@@ -573090,76 +573011,16 @@
   "hr-time/timing-attack.html": [
    "1d3d88e71fb886374b50c6dc2c1141a80c8c0a06",
    "testharness"
   ],
   "hr-time/window-worker-timeOrigin.window.js": [
    "51267d21c761c3ccaee34bc4d5e533e69d739bc5",
    "testharness"
   ],
-  "html-imports/META.yml": [
-   "11323815db763cf9d0649abb86380139cf9c136c",
-   "support"
-  ],
-  "html-imports/document/document-method-changes.html": [
-   "8a90989d87713f746a4a9d4d0d8c4816ba2beab3",
-   "testharness"
-  ],
-  "html-imports/document/resources/body-only.html": [
-   "c3b2c7949a76a93f37d17ce9c73f9cbf409f71ae",
-   "support"
-  ],
-  "html-imports/document/resources/test-in-import.html": [
-   "7a1e3187d5d622045131a4a983f269c141c6a504",
-   "support"
-  ],
-  "html-imports/fetching/already-in-import-map.html": [
-   "ae688a3085030e42436256481111d4794102885e",
-   "testharness"
-  ],
-  "html-imports/fetching/loading-attempt.html": [
-   "c2e55cc530dcf497e022b47aee69c81120bfdd45",
-   "testharness"
-  ],
-  "html-imports/fetching/resources/async.html": [
-   "0c47a589bdeb3b284de1000849ec7a0387393732",
-   "support"
-  ],
-  "html-imports/fetching/resources/dynamic.html": [
-   "dece37f1264025c6968b81252edf4ebc1f701adf",
-   "support"
-  ],
-  "html-imports/fetching/resources/hello.html": [
-   "2c118b51566fc8dc7ecd6304e04d3b7ca5fa2244",
-   "support"
-  ],
-  "html-imports/fetching/resources/parent-of-hello.html": [
-   "d824222626234a376b86edc75a8cd7bbf343111f",
-   "support"
-  ],
-  "html-imports/html-link-element/import-attribute.html": [
-   "9cdfe3f3ab4dc09f3ba400921fcd2c02f5331da6",
-   "testharness"
-  ],
-  "html-imports/html-link-element/resources/body-only-0.html": [
-   "29691598d52a661b961a3bdfaffeb410b5be37fa",
-   "support"
-  ],
-  "html-imports/html-link-element/resources/body-only-1.html": [
-   "321d26a916eb54298c8e4f951c6a3f9b22f60524",
-   "support"
-  ],
-  "html-imports/html-link-element/resources/body-only-2.html": [
-   "52a42561dc77affda708aff42e149880df55b4e9",
-   "support"
-  ],
-  "html-imports/html-link-element/resources/hello.css": [
-   "fbbe647161c9b6994b36254a136e4eccd7d825e6",
-   "support"
-  ],
   "html-longdesc/META.yml": [
    "0a540910326292561d9e3b31288db0f63ff5c904",
    "support"
   ],
   "html-longdesc/README.html": [
    "f9e9b10b7cab8265ab84cc874665629003f317c9",
    "support"
   ],
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/META.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-suggested_reviewers:
-  - omo
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/document/document-method-changes.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>The import attribute</title>
-<link rel="help" href="http://w3c.github.io/webcomponents/spec/imports/#interface-import">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<link id="importLink" rel="import" href="resources/body-only.html">
-<link                 rel="import" href="resources/test-in-import.html">
-</head>
-<body>
-<div id="log"></div>
-<script>
-test(function() {
-   assert_throws('INVALID_STATE_ERR', function() { importLink.import.open(); }, 'document.open()');
-   assert_throws('INVALID_STATE_ERR', function() { importLink.import.write('Hello'); }, 'document.write()');
-   assert_throws('INVALID_STATE_ERR', function() { importLink.import.open(); }, 'document.close()');
-}, 'Throws an InvalidStateError exception if the Document is an import: From the master document');
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/document/resources/body-only.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body id="body-only">Hello</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/document/resources/test-in-import.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script>
-test(function() {
-   var doc = document.currentScript.ownerDocument;
-   assert_throws('INVALID_STATE_ERR', function() { doc.open(); }, 'document.open()');
-   assert_throws('INVALID_STATE_ERR', function() { doc.write('Hello'); }, 'document.write()');
-   assert_throws('INVALID_STATE_ERR', function() { doc.open(); }, 'document.close()');
-}, 'Throws an InvalidStateError exception if the Document is an import: From an import');
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/fetching/already-in-import-map.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Fetching import</title>
-<link rel="help" href="http://w3c.github.io/webcomponents/spec/imports/#fetching-import">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<link id="first" rel="import" href="resources/hello.html">
-<link id="shouldBeInImportMap" rel="import" href="resources/hello.html">
-<link id="parentOfFirst" rel="import" href="resources/parent-of-hello.html">
-
-</head>
-<body>
-<div id="log"></div>
-<script>
-test(function() {
-   assert_true(window.first.import === window.shouldBeInImportMap.import);
-}, 'If LOCATION is already in the import map, let IMPORT be the imported document for LOCATION and stop. (1)');
-
-test(function() {
-   assert_true(window.first.import === window.parentOfFirst.import.getElementById('child').import);
-}, 'If LOCATION is already in the import map, let IMPORT be the imported document for LOCATION and stop. (2)');
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/fetching/loading-attempt.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Fetching import</title>
-<link rel="help" href="http://w3c.github.io/webcomponents/spec/imports/#fetching-import">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<script>
-var onloadWasCalledOnSuccess = false;
-var onerrorWasCalledOnSuccess = false;
-function helloLoadHandler() { onloadWasCalledOnSuccess = true; }
-function helloErrorHandler() { onerrorWasCalledOnSuccess = true; }
-
-var onloadWasCalledOnFail = false;
-var onerrorWasCalledOnFail = false;
-function nosuchLoadHandler() { onloadWasCalledOnFail = true; }
-function nosuchErrorHandler() { onerrorWasCalledOnFail = true; }
-</script>
-
-<link rel="import" href="resources/hello.html" onload="helloLoadHandler()" onerror="helloLoadHandler()">
-<link rel="import" href="resources/no-such.html" onload="nosuchLoadHandler()" onerror="nosuchErrorHandler()">
-
-<script>
-test(function() {
-    assert_true(onloadWasCalledOnSuccess);
-    assert_false(onerrorWasCalledOnSuccess);
-}, 'The loading attempt must be considered successful if IMPORT is not null on the algorithm completion, and failed otherwise. (1)');
-
-test(function() {
-    assert_false(onloadWasCalledOnFail);
-    assert_true(onerrorWasCalledOnFail);
-}, 'The loading attempt must be considered successful if IMPORT is not null on the algorithm completion, and failed otherwise. (2)');
-
-t1 = async_test('The loading attempt must be considered successful if IMPORT is not null on the algorithm completion, and failed otherwise. (3)')
-t1.step(function() {
-   var importElement = document.createElement('link');
-   importElement.setAttribute('rel', 'import');
-   importElement.setAttribute('href', 'resources/dynamic.html');
-   importElement.addEventListener("error", assert_unreached);
-   importElement.addEventListener("load", function() {
-       t1.done();
-   });
-
-   document.head.appendChild(importElement);
-});
-
-var onloadWasCalledOnAsync = false;
-var onerrorWasCalledOnAsync = false;
-var asyncAttemptDone = function() { assert_unreached(); };
-
-function asyncLoadHandler() {
-    onloadWasCalledOnAsync = true;
-    asyncAttemptDone();
-}
-function asyncErrorHandler() {
-    onerrorWasCalledOnAsync = true;
-    asyncAttemptDone();
-}
-
-t2 = async_test('Every import that is not marked as async delays the load event in the Document.');
-asyncAttemptDone = function() {
-    t2.step(function() {
-        assert_true(onloadWasCalledOnAsync);
-        assert_false(onerrorWasCalledOnAsync);
-        t2.done();
-    });
-};
-
-</script>
-<link rel="import" href="resources/async.html" onload="asyncLoadHandler()" onerror="asyncErrorHandler()" async>
-</head>
-<body>
-<div id="log"></div>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/fetching/resources/async.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<body>Async</body>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/fetching/resources/dynamic.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<body>Dyamic</body>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/fetching/resources/hello.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<body>Hello</body>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/fetching/resources/parent-of-hello.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<link id="child" rel="import" href="hello.html">
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/html-link-element/import-attribute.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>The import attribute</title>
-<link rel="help" href="http://w3c.github.io/webcomponents/spec/imports/#interface-import">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<link id="nonImportLink" rel="stylesheet" href="resources/hello.css">
-<link id="goOutFromDocument" rel="import" href="resources/body-only-0.html">
-<link id="importLink"        rel="import" href="resources/body-only-1.html">
-<link id="anotherImportLink" rel="import" href="resources/body-only-2.html">
-
-</head>
-<body>
-<div id="log"></div>
-<script>
-test(function() {
-   assert_equals(nonImportLink.import, null);
-}, 'The import attribute must return null if the link does not represent an import.');
-
-test(function() {
-   var link = goOutFromDocument;
-   assert_true(link.import != null);
-   document.head.removeChild(link);
-   assert_equals(link.import, null);
-}, 'The import attribute must return null if the link element is not in a Document.');
-
-test(function() {
-   assert_equals(importLink.import.body.id, 'body-only-1');
-}, 'The attribute must return the imported document for the import.');
-
-test(function() {
-   var importA = importLink.import;
-   var importB = document.querySelector('#importLink').import;
-   var anotherImport = document.querySelector('#anotherImportLink').import;
-   assert_true(importA === importB);
-   assert_true(importA !== anotherImport);
-}, 'The same object must be returned each time.');
-</script>
-</body>
-</html>
-
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/html-link-element/resources/body-only-0.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body id="body-only-0">Hello</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/html-link-element/resources/body-only-1.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body id="body-only-1">Hello</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/html-link-element/resources/body-only-2.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body id="body-only-2">Hello</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html-imports/html-link-element/resources/hello.css
+++ /dev/null
@@ -1,3 +0,0 @@
-h1 {
-  color: red;
-}
\ No newline at end of file