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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/document-metadata/the-link-element/link-style-error-01.html

Issue 2143653006: Import wpt@c875b4212a473363afe8c09f012edf201386cb5b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update W3CImportExpectations Created 4 years, 5 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/wpt/html/semantics/document-metadata/the-link-element/link-style-error-01.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/document-metadata/the-link-element/link-style-error-01.html b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/document-metadata/the-link-element/link-style-error-01.html
index ce35e03d93f09d306ebcb0aae207a60905212fc1..04608460b83ebcea3cdba551ed1320ee357ac37d 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/document-metadata/the-link-element/link-style-error-01.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/document-metadata/the-link-element/link-style-error-01.html
@@ -7,17 +7,32 @@
<div id="log"></div>
<div id="test">
<script>
-//var t404 = async_test("Should get an error event for a 404 error.")
-//t404.step(function() {
-// var elt = document.createElement("link");
-// elt.onerror = t404.step_func(function() {
-// assert_true(true, "Got error event for 404 error.")
-// t404.done()
-// })
-// elt.rel = "stylesheet";
-// elt.href = 404 error;
-// document.getElementsByTagName("head")[0].appendChild(elt);
-//})
+var t404 = async_test("Should get an error event for a 404 error.")
+t404.step(function() {
+ var elt = document.createElement("link");
+ elt.onerror = t404.step_func(function() {
+ assert_true(true, "Got error event for 404 error.")
+ t404.step_timeout(function() { t404.done() }, 0);
+ })
+ elt.onload = t404.unreached_func("load event should not be fired");
+ elt.rel = "stylesheet";
+ elt.href = "nonexistent_stylesheet.css";
+ document.getElementsByTagName("head")[0].appendChild(elt);
+})
+
+var tUnsupported = async_test("Should get an error event for an unsupported URL.")
+tUnsupported.step(function() {
+ var elt = document.createElement("link");
+ elt.onerror = tUnsupported.step_func(function() {
+ assert_true(true, "Got error event for unsupported URL.")
+ tUnsupported.step_timeout(function() { tUnsupported.done() }, 0);
+ })
+ elt.onload = tUnsupported.unreached_func("load event should not be fired");
+ elt.rel = "stylesheet";
+ elt.href = "nonexistent:stylesheet.css";
+ document.getElementsByTagName("head")[0].appendChild(elt);
+})
+
var tText = async_test("Should get an error event for a text/plain response.")
tText.step(function() {
var elt = document.createElement("link");

Powered by Google App Engine
This is Rietveld 408576698