Bug 1472624 [wpt PR 11749] - [css-properties-values-api]: Drop .tentative from URL resolution test., a=testonly
authorAnders Hartvoll Ruud <andruud@chromium.org>
Sat, 07 Jul 2018 00:12:53 +0000
changeset 426138 b70f95e61e2c81e5c930000cb647ec660eef329e
parent 426137 12c477fd49fd80ffa49c8c5966bc5dbd4396a782
child 426139 207e4a0ec2af3a518738206fa929eb7527d1fd0e
push id34267
push userrgurzau@mozilla.com
push dateWed, 11 Jul 2018 22:05:21 +0000
treeherdermozilla-central@3aca103e4915 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1472624, 11749, 851490, 1121463, 572145
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 1472624 [wpt PR 11749] - [css-properties-values-api]: Drop .tentative from URL resolution test., a=testonly Automatic update from web-platform-tests[css-properties-values-api]: Drop .tentative from URL resolution test. R=eae@chromium.org Bug: 851490 Change-Id: I0090986f81763d3c84f1245d5340286f9a3a1dff Reviewed-on: https://chromium-review.googlesource.com/1121463 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Anders Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#572145} -- wpt-commits: 0630b464a24ccac061f913a0240261dad2dd2f3a wpt-pr: 11749
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-properties-values-api/url-resolution.html
testing/web-platform/tests/css/css-properties-values-api/url-resolution.tentative.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -320418,19 +320418,19 @@
     ]
    ],
    "css/css-properties-values-api/registered-property-initial.html": [
     [
      "/css/css-properties-values-api/registered-property-initial.html",
      {}
     ]
    ],
-   "css/css-properties-values-api/url-resolution.tentative.html": [
-    [
-     "/css/css-properties-values-api/url-resolution.tentative.html",
+   "css/css-properties-values-api/url-resolution.html": [
+    [
+     "/css/css-properties-values-api/url-resolution.html",
      {}
     ]
    ],
    "css/css-properties-values-api/var-reference-registered-properties-cycles.html": [
     [
      "/css/css-properties-values-api/var-reference-registered-properties-cycles.html",
      {}
     ]
@@ -526303,18 +526303,18 @@
   "css/css-properties-values-api/support/main/main.js": [
    "311fa24d3d02518cc9378bab785bf8e49714b78c",
    "support"
   ],
   "css/css-properties-values-api/support/main/main.utf16be.css": [
    "bd7bbb7cfc8ca930399abcf886c3da0d446725eb",
    "support"
   ],
-  "css/css-properties-values-api/url-resolution.tentative.html": [
-   "2f651c735028307632a6f7fb934e138e626acac7",
+  "css/css-properties-values-api/url-resolution.html": [
+   "582f4f05a8b48035c3369c8ce29252e845450cfb",
    "testharness"
   ],
   "css/css-properties-values-api/var-reference-registered-properties-cycles.html": [
    "bc061780caa0085fca5b003c1aed68c7b162eabd",
    "testharness"
   ],
   "css/css-properties-values-api/var-reference-registered-properties.html": [
    "bdaa0efd1894244a44350f3001a2ae40c35c752b",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-properties-values-api/url-resolution.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
+<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#relative-urls" />
+<meta name="assert" content="This test verifies that relative URLs in registered properties resolve correctly" />
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script src="support/main/main.js"></script>
+<script src="support/alt/alt.js"></script>
+<link id="main" rel="stylesheet" type="text/css" href="support/main/main.css" />
+<link id="main_utf16be" rel="stylesheet" type="text/css" href="support/main/main.utf16be.css" />
+<link id="alt" rel="stylesheet" type="text/css" href="support/alt/alt.css" />
+<div id=target>
+    <div id=inner></div>
+</div>
+<script>
+function parse_url(urlstr) {
+    urlstr = urlstr.trim();
+    if (!urlstr.startsWith('url("') || !urlstr.endsWith('")'))
+        throw 'Unknown url format: ' + urlstr;
+    return urlstr.slice(5, -2);
+}
+
+function get_bg_url(element) {
+    return parse_url(getComputedStyle(element)['background-image']);
+}
+
+function get_bg_urls(element) {
+    return getComputedStyle(element)['background-image']
+            .split(',')
+            .map(x => x.trim())
+            .map(x => parse_url(x));
+}
+
+function assert_base_path_equal(actual, expected) {
+    let actual_base = new URL(actual).pathname.split('/').slice(0, -1);
+    let expected_base = new URL(expected).pathname.split('/').slice(0, -1);
+    assert_equals(actual_base.join('/'), expected_base.join('/'));
+}
+
+function assert_base_paths_equal(actual, expected) {
+    assert_equals(actual.length, expected.length);
+    for (let i = 0; i < actual.length; i++) {
+        assert_base_path_equal(actual[i], expected[i]);
+    }
+}
+
+test(function() {
+    target.style = 'background-image: var(--unreg-url);';
+    assert_base_path_equal(get_bg_url(target), document.baseURI);
+}, 'Unregistered property resolves against document (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--unreg-func);';
+    assert_base_path_equal(get_bg_url(target), document.baseURI);
+}, 'Unregistered property resolves against document (URL function)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-non-inherited-url);';
+    assert_base_path_equal(get_bg_url(target), main.sheet.href);
+}, 'Registered non-inherited <url> resolves against sheet (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-non-inherited-func);';
+    assert_base_path_equal(get_bg_url(target), main.sheet.href);
+}, 'Registered non-inherited <url> resolves against sheet (URL function)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-inherited-url);';
+    assert_base_path_equal(get_bg_url(target), main.sheet.href);
+}, 'Registered inherited <url> resolves against sheet (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-inherited-func);';
+    assert_base_path_equal(get_bg_url(target), main.sheet.href);
+}, 'Registered inherited <url> resolves against sheet (URL function)');
+
+test(function() {
+    inner.style = 'background-image: var(--reg-inherited-url);';
+    assert_base_path_equal(get_bg_url(inner), main.sheet.href);
+}, 'Registered inherited <url> resolves against sheet (Child node, URL token)');
+
+test(function() {
+    inner.style = 'background-image: var(--reg-inherited-func);';
+    assert_base_path_equal(get_bg_url(inner), main.sheet.href);
+}, 'Registered inherited <url> resolves against sheet (Child node, URL function)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-ref-to-unreg-url);';
+    assert_base_path_equal(get_bg_url(target), main.sheet.href);
+}, 'Registered property with unregistered var reference resolves against sheet (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-ref-to-unreg-func);';
+    assert_base_path_equal(get_bg_url(target), main.sheet.href);
+}, 'Registered property with unregistered var reference resolves against sheet. (URL function)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-ref-to-reg-url);';
+    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
+}, 'Registered property with registered var reference resolves against sheet of referenced property (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-ref-to-reg-func);';
+    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
+}, 'Registered property with registered var reference resolves against sheet of referenced property (URL function)');
+
+test(function() {
+    target.style = 'background-image: var(--unreg-ref-to-reg-url);';
+    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
+}, 'Unregistered property with registered var reference resolves against sheet of referenced property (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--unreg-ref-to-reg-func);';
+    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
+}, 'Unregistered property with registered var reference resolves against sheet of referenced property (URL function)');
+
+test(function() {
+    target.style = 'background-image: var(--unreg-multi-ref-to-reg-urls);';
+    assert_base_paths_equal(get_bg_urls(target), [main.sheet.href, alt.sheet.href]);
+}, 'Multiple (registered) var reference resolve against respective sheets (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--unreg-multi-ref-to-reg-funcs);';
+    assert_base_paths_equal(get_bg_urls(target), [main.sheet.href, alt.sheet.href]);
+}, 'Multiple (registered) var reference resolve against respective sheets (URL function)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-utf16be-url);';
+    assert_base_path_equal(get_bg_url(target), main_utf16be.sheet.href);
+}, 'Registered UTF16BE-encoded var reference resolve against sheet (URL token)');
+
+test(function() {
+    target.style = 'background-image: var(--reg-utf16be-func);';
+    assert_base_path_equal(get_bg_url(target), main_utf16be.sheet.href);
+}, 'Registered UTF16BE-encoded var reference resolve against sheet (URL function)');
+
+</script>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-properties-values-api/url-resolution.tentative.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!DOCTYPE html>
-<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
-<!-- TODO(andruud): Replace help link when spec is updated. -->
-<link rel="help" href="https://github.com/w3c/css-houdini-drafts/issues/393#issuecomment-294706386" />
-<meta name="assert" content="This test verifies that relative URLs in registered properties resolve correctly" />
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<script src="support/main/main.js"></script>
-<script src="support/alt/alt.js"></script>
-<link id="main" rel="stylesheet" type="text/css" href="support/main/main.css" />
-<link id="main_utf16be" rel="stylesheet" type="text/css" href="support/main/main.utf16be.css" />
-<link id="alt" rel="stylesheet" type="text/css" href="support/alt/alt.css" />
-<div id=target>
-    <div id=inner></div>
-</div>
-<script>
-function parse_url(urlstr) {
-    urlstr = urlstr.trim();
-    if (!urlstr.startsWith('url("') || !urlstr.endsWith('")'))
-        throw 'Unknown url format: ' + urlstr;
-    return urlstr.slice(5, -2);
-}
-
-function get_bg_url(element) {
-    return parse_url(getComputedStyle(element)['background-image']);
-}
-
-function get_bg_urls(element) {
-    return getComputedStyle(element)['background-image']
-            .split(',')
-            .map(x => x.trim())
-            .map(x => parse_url(x));
-}
-
-function assert_base_path_equal(actual, expected) {
-    let actual_base = new URL(actual).pathname.split('/').slice(0, -1);
-    let expected_base = new URL(expected).pathname.split('/').slice(0, -1);
-    assert_equals(actual_base.join('/'), expected_base.join('/'));
-}
-
-function assert_base_paths_equal(actual, expected) {
-    assert_equals(actual.length, expected.length);
-    for (let i = 0; i < actual.length; i++) {
-        assert_base_path_equal(actual[i], expected[i]);
-    }
-}
-
-test(function() {
-    target.style = 'background-image: var(--unreg-url);';
-    assert_base_path_equal(get_bg_url(target), document.baseURI);
-}, 'Unregistered property resolves against document (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--unreg-func);';
-    assert_base_path_equal(get_bg_url(target), document.baseURI);
-}, 'Unregistered property resolves against document (URL function)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-non-inherited-url);';
-    assert_base_path_equal(get_bg_url(target), main.sheet.href);
-}, 'Registered non-inherited <url> resolves against sheet (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-non-inherited-func);';
-    assert_base_path_equal(get_bg_url(target), main.sheet.href);
-}, 'Registered non-inherited <url> resolves against sheet (URL function)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-inherited-url);';
-    assert_base_path_equal(get_bg_url(target), main.sheet.href);
-}, 'Registered inherited <url> resolves against sheet (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-inherited-func);';
-    assert_base_path_equal(get_bg_url(target), main.sheet.href);
-}, 'Registered inherited <url> resolves against sheet (URL function)');
-
-test(function() {
-    inner.style = 'background-image: var(--reg-inherited-url);';
-    assert_base_path_equal(get_bg_url(inner), main.sheet.href);
-}, 'Registered inherited <url> resolves against sheet (Child node, URL token)');
-
-test(function() {
-    inner.style = 'background-image: var(--reg-inherited-func);';
-    assert_base_path_equal(get_bg_url(inner), main.sheet.href);
-}, 'Registered inherited <url> resolves against sheet (Child node, URL function)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-ref-to-unreg-url);';
-    assert_base_path_equal(get_bg_url(target), main.sheet.href);
-}, 'Registered property with unregistered var reference resolves against sheet (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-ref-to-unreg-func);';
-    assert_base_path_equal(get_bg_url(target), main.sheet.href);
-}, 'Registered property with unregistered var reference resolves against sheet. (URL function)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-ref-to-reg-url);';
-    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
-}, 'Registered property with registered var reference resolves against sheet of referenced property (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-ref-to-reg-func);';
-    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
-}, 'Registered property with registered var reference resolves against sheet of referenced property (URL function)');
-
-test(function() {
-    target.style = 'background-image: var(--unreg-ref-to-reg-url);';
-    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
-}, 'Unregistered property with registered var reference resolves against sheet of referenced property (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--unreg-ref-to-reg-func);';
-    assert_base_path_equal(get_bg_url(target), alt.sheet.href);
-}, 'Unregistered property with registered var reference resolves against sheet of referenced property (URL function)');
-
-test(function() {
-    target.style = 'background-image: var(--unreg-multi-ref-to-reg-urls);';
-    assert_base_paths_equal(get_bg_urls(target), [main.sheet.href, alt.sheet.href]);
-}, 'Multiple (registered) var reference resolve against respective sheets (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--unreg-multi-ref-to-reg-funcs);';
-    assert_base_paths_equal(get_bg_urls(target), [main.sheet.href, alt.sheet.href]);
-}, 'Multiple (registered) var reference resolve against respective sheets (URL function)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-utf16be-url);';
-    assert_base_path_equal(get_bg_url(target), main_utf16be.sheet.href);
-}, 'Registered UTF16BE-encoded var reference resolve against sheet (URL token)');
-
-test(function() {
-    target.style = 'background-image: var(--reg-utf16be-func);';
-    assert_base_path_equal(get_bg_url(target), main_utf16be.sheet.href);
-}, 'Registered UTF16BE-encoded var reference resolve against sheet (URL function)');
-
-</script>