aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/html/semantics/text-level-semantics
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2018-01-04 13:44:24 -0500
committerJosh Matthews <josh@joshmatthews.net>2018-01-09 12:52:27 -0500
commit2b6f573eb5d1920cec5ad8a1ee98474b715e2e08 (patch)
tree3d900a9792c86b5a27865914f3e100b28ad9334a /tests/wpt/web-platform-tests/html/semantics/text-level-semantics
parentaa199307c86051e13b17a5feb77722ddcdeed5ce (diff)
downloadservo-2b6f573eb5d1920cec5ad8a1ee98474b715e2e08.tar.gz
servo-2b6f573eb5d1920cec5ad8a1ee98474b715e2e08.zip
Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317
Diffstat (limited to 'tests/wpt/web-platform-tests/html/semantics/text-level-semantics')
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html6
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html25
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/resources/a-download-click.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage-notref.html6
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage.html8
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage-notref.html6
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage.html8
7 files changed, 50 insertions, 11 deletions
diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html
index db9e1cbfb92..3c8adc0b97e 100644
--- a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html
+++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html
@@ -11,15 +11,15 @@
async_test(t => {
const errorFrame = document.createElement("iframe");
- errorFrame.addEventListener("load", function () {
+ errorFrame.addEventListener("load", t.step_func(function () {
errorFrame.contentWindow.addEventListener(
"beforeunload", t.unreached_func("Navigated instead of downloading"));
errorFrame.contentDocument.querySelector("#error-url").click();
t.step_timeout(() => t.done(), 1000);
- });
+ }));
errorFrame.src = "resources/a-download-404.html";
document.body.appendChild(errorFrame);
}, "Do not navigate to 404 for anchor with download");
</script>
-</body> \ No newline at end of file
+</body>
diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html
index ad6a3df001e..22d329f2452 100644
--- a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html
+++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html
@@ -7,18 +7,27 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<a id="blob-url" download="foo.html">Click me</a>
-
+<body>
<script>
"use strict";
+async_test(t => {
+ const frame = document.createElement("iframe");
-const string = "test";
-const blob = new Blob([string], { type: "text/html" });
+ frame.addEventListener("load", t.step_func(function () {
+ frame.contentWindow.addEventListener(
+ "beforeunload", t.unreached_func("Navigated instead of downloading"));
+ const string = "test";
+ const blob = new Blob([string], { type: "text/html" });
-const link = document.querySelector("#blob-url");
-link.href = URL.createObjectURL(blob);
+ const link = frame.contentDocument.querySelector("#blob-url");
+ link.href = URL.createObjectURL(blob);
-link.click();
+ link.click();
-done();
+ t.step_timeout(() => t.done(), 1000);
+ }));
+ frame.src = "resources/a-download-click.html";
+ document.body.appendChild(frame);
+}, "Clicking on an <a> element with a download attribute must not throw an exception");
</script>
+</body>
diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/resources/a-download-click.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/resources/a-download-click.html
new file mode 100644
index 00000000000..7d36c21d1e4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/resources/a-download-click.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<a id="blob-url" download="foo.html">Click me</a>
diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage-notref.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage-notref.html
new file mode 100644
index 00000000000..3d3c46a281f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage-notref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Reference File</title>
+<link rel="author" title="Intel" href="http://www.intel.com/">
+
+<p>You enter a small room. Your sword glows brighter. A rat scurries past the corner wall.</p>
diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage.html
new file mode 100644
index 00000000000..ff2105dcae8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-b-element/b-usage.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML test: b - highlight keywords</title>
+<link rel="author" title="Intel" href="http://www.intel.com/">
+<link rel="mismatch" href="b-usage-notref.html">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-b-element"/>
+
+<p>You enter a small room. Your <b>sword</b> glows brighter. A <b>rat</b> scurries past the corner wall.</p>
diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage-notref.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage-notref.html
new file mode 100644
index 00000000000..f5747811ae4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage-notref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Reference File</title>
+<link rel="author" title="Intel" href="http://www.intel.com/">
+
+<p>君くん子しは和わして同どうぜず</p>
diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage.html
new file mode 100644
index 00000000000..59c076cd092
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-ruby-element/ruby-usage.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML test: ruby - mark phrasing content</title>
+<link rel="author" title="Intel" href="http://www.intel.com/">
+<link rel="mismatch" href="ruby-usage-notref.html">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-ruby-element"/>
+
+<p><ruby>君<rt>くん</ruby><ruby>子<rt>し</ruby>は<ruby>和<rt>わ</ruby>して<ruby>同<rt>どう</ruby>ぜず</p>