| Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-import.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-import.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-import.php
|
| index 6ff28e2b05851911cf2cd08a7f157927fd7150ac..63ca352f1651ba7b6328f79ef85ee1526ecf9b89 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-import.php
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-import.php
|
| @@ -4,6 +4,7 @@ header("Suborigin: foobar");
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| +<meta charset="utf-8">
|
| <title>Allow suborigin in HTTP header</title>
|
| <script src="/resources/testharness.js"></script>
|
| <script src="/resources/testharnessreport.js"></script>
|
| @@ -14,49 +15,51 @@ header("Suborigin: foobar");
|
| <script>
|
| var import_tests = [];
|
| import_tests.next = function() {
|
| - if (import_tests.length > 0) {
|
| - import_tests.shift().execute();
|
| - }
|
| + if (import_tests.length > 0) {
|
| + import_tests.shift().execute();
|
| + }
|
| }
|
|
|
| -var SuboriginHTMLImportTest = function(pass, name, href, crossoriginValue) {
|
| +var SuboriginHTMLImportTest = function(pass, name, href, crossorigin_value) {
|
| var import_fail_verify = function(div, e) {
|
| assert_equals(e.import, null);
|
| };
|
| - SuboriginLinkTest.call(this, import_tests, "import", function(){}, import_fail_verify, pass, "Import: " + name, href, crossoriginValue);
|
| + SuboriginLinkTest.call(
|
| + this, import_tests, 'import', function() { }, import_fail_verify,
|
| + pass, 'Import: ' + name, href, crossorigin_value);
|
| };
|
| SuboriginHTMLImportTest.prototype = Object.create(SuboriginLinkTest.prototype);
|
|
|
| add_result_callback(function(res) {
|
| - if (res.name.startsWith("Style: ") || res.name.startsWith("Import: ")) {
|
| - import_tests.next();
|
| + if (res.name.startsWith('Style: ') || res.name.startsWith('Import: ')) {
|
| + import_tests.next();
|
| }
|
| });
|
|
|
| // HTML Imports tests
|
| new SuboriginHTMLImportTest(
|
| - false,
|
| - "<crossorigin='anonymous'>, ACAO: " + server,
|
| - xoriginAnonHello(),
|
| - "anonymous");
|
| + false,
|
| + '<crossorigin=\'anonymous\'>, ACAO: ' + server,
|
| + xoriginAnonHello(),
|
| + 'anonymous');
|
|
|
| new SuboriginHTMLImportTest(
|
| - true,
|
| - "<crossorigin='anonymous'>, ACAO: *",
|
| - xoriginAnonHello('*'),
|
| - "anonymous");
|
| + true,
|
| + '<crossorigin=\'anonymous\'>, ACAO: *',
|
| + xoriginAnonHello('*'),
|
| + 'anonymous');
|
|
|
| new SuboriginHTMLImportTest(
|
| - false,
|
| - "<crossorigin='use-credentials'>, ACAO: " + server,
|
| - xoriginCredsHello(),
|
| - "use-credentials");
|
| + false,
|
| + '<crossorigin=\'use-credentials\'>, ACAO: ' + server,
|
| + xoriginCredsHello(),
|
| + 'use-credentials');
|
|
|
| new SuboriginHTMLImportTest(
|
| - false,
|
| - "<crossorigin='anonymous'>, CORS-ineligible resource",
|
| - xoriginIneligibleHello(),
|
| - "anonymous");
|
| + false,
|
| + '<crossorigin=\'anonymous\'>, CORS-ineligible resource',
|
| + xoriginIneligibleHello(),
|
| + 'anonymous');
|
|
|
| import_tests.next();
|
| </script>
|
|
|