| Index: third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/data-url.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/data-url.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/data-url.html
|
| index 86190b6cf9f03cf00445d6b7c5e6f48aa6107f8c..6fad50527177e756db35842e054bf19d6e4dfbe4 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/data-url.html
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/data-url.html
|
| @@ -1,23 +1,31 @@
|
| <!doctype html>
|
| <meta charset="utf-8">
|
| -<title>data URL and scripts</title>
|
| +<title>Test data URL and scripts errors</title>
|
| <script src="/resources/testharness.js"></script>
|
| <script src="/resources/testharnessreport.js"></script>
|
| <div id=log></div>
|
| <script>
|
| - setup({allow_uncaught_exception:true})
|
| - async_test(t => {
|
| + setup({allow_uncaught_exception:true});
|
| + async_test(function(t) {
|
| var counter = 1
|
| - window.onerror = t.step_func((message, x, xx, xxx, e) => {
|
| - assert_not_equals(message, "Script error.") // Cannot be "muted" as data URLs are same-origin
|
| + window.onerror = t.step_func((message, url, lineno, colno, e) => {
|
| + // Test that error is not muted as data URLs have a response type of "default"
|
| + // and errors should only be muted if the response type is "opaque" or "opaqueredirect"
|
| + assert_not_equals(message, "Script error.")
|
| + assert_not_equals(url, null);
|
| + assert_not_equals(url, "");
|
| + assert_equals(typeof lineno, "number");
|
| + assert_not_equals(lineno, 0);
|
| + assert_equals(typeof colno, "number");
|
| + assert_not_equals(colno, 0);
|
| assert_equals(typeof e, "number")
|
| assert_equals(e, counter)
|
| if (counter == 3) {
|
| t.done()
|
| }
|
| counter++
|
| - })
|
| - })
|
| + });
|
| + });
|
| </script>
|
| <script src="data:,throw 1"></script>
|
| <script src="data:,throw 2" crossorigin></script>
|
|
|