| Index: LayoutTests/http/tests/security/same-origin-css-in-quirks.html
|
| diff --git a/LayoutTests/http/tests/security/cross-origin-css.html b/LayoutTests/http/tests/security/same-origin-css-in-quirks.html
|
| similarity index 51%
|
| copy from LayoutTests/http/tests/security/cross-origin-css.html
|
| copy to LayoutTests/http/tests/security/same-origin-css-in-quirks.html
|
| index 36ab99ecef51f9e029cef73aec28ccca798cd4a5..0aecfd737696593523bdd9db26ecd99fc6d9997f 100644
|
| --- a/LayoutTests/http/tests/security/cross-origin-css.html
|
| +++ b/LayoutTests/http/tests/security/same-origin-css-in-quirks.html
|
| @@ -1,26 +1,29 @@
|
| -<!DOCTYPE html>
|
| <html>
|
| +<!--
|
| + Note the lack of doctype above: That is intentional. This test
|
| + MUST be in quirks mode to have any real testing power.
|
| +-->
|
| <head>
|
| -<title>Cross-origin CSS</title>
|
| +<title>Same-origin CSS in quirks mode</title>
|
|
|
| <script src="/resources/testharness.js"></script>
|
| <script src="/resources/testharnessreport.js"></script>
|
|
|
| <link rel="stylesheet"
|
| - href="resources/redir.php?url=http://localhost:8000/security/resources/xorigincss1.html"></link>
|
| + href="resources/redir.php?url=/security/resources/xorigincss1.html"></link>
|
| <link rel="stylesheet"
|
| type="text/css"
|
| - href="resources/redir.php?url=http://localhost:8000/security/resources/xorigincss2.html"></link>
|
| + href="resources/redir.php?url=/security/resources/xorigincss2.html"></link>
|
| <link rel="stylesheet"
|
| - href="resources/redir.php?url=http://localhost:8000/security/resources/xorigincss1.css"></link>
|
| + href="resources/redir.php?url=/security/resources/xorigincss1.css"></link>
|
| <link rel="stylesheet"
|
| href="resources/xorigincss3.html"></link>
|
| <style>
|
| /* Deliberately reuse the same file / class / id on this first one */
|
| -@import "resources/redir.php?url=http://localhost:8000/security/resources/xorigincss2.html";
|
| -@import "resources/redir.php?url=http://localhost:8000/security/resources/xorigincss4.html";
|
| -@import "resources/redir.php?url=http://localhost:8000/security/resources/xorigincss7.html";
|
| -@import "resources/redir.php?url=http://localhost:8000/security/resources/xorigincss2.css";
|
| +@import "resources/redir.php?url=/security/resources/xorigincss2.html";
|
| +@import "resources/redir.php?url=/security/resources/xorigincss4.html";
|
| +@import "resources/redir.php?url=/security/resources/xorigincss7.html";
|
| +@import "resources/redir.php?url=/security/resources/xorigincss2.css";
|
| @import "resources/xorigincss5.html";
|
|
|
| /* Check that data: is still allowed for non-CORS cross-origin image fetches. */
|
| @@ -33,32 +36,32 @@
|
| function getBackgroundColorForId(id) {
|
| return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
|
| }
|
| - var onloadTest = async_test("Testing cross-origin and MIME behavior for CSS.");
|
| + var onloadTest = async_test("Testing same-origin and MIME behavior for CSS.");
|
| window.onload = function () {
|
| test(function () {
|
| - assert_equals(getBackgroundColorForId('id1'), 'rgba(0, 0, 0, 0)');
|
| - }, 'xorigincss1.html should not be loaded via <link>.');
|
| + assert_equals(getBackgroundColorForId('id1'), 'rgb(255, 255, 0)');
|
| + }, 'xorigincss1.html should be loaded via <link>.');
|
| test(function () {
|
| - assert_equals(getBackgroundColorForId('id2'), 'rgba(0, 0, 0, 0)');
|
| - }, 'xorigincss2.html should not be loaded either via <link> or @import.');
|
| + assert_equals(getBackgroundColorForId('id2'), 'rgb(255, 255, 0)');
|
| + }, 'xorigincss2.html should be loaded either via <link> or @import.');
|
| test(function () {
|
| assert_equals(getBackgroundColorForId('id3'), 'rgb(255, 255, 0)');
|
| }, 'xorigincss1.css should be loaded via <link>');
|
| test(function () {
|
| - assert_equals(getBackgroundColorForId('id4'), 'rgba(0, 0, 0, 0)');
|
| - }, 'xorigincss3.html should not be loaded, even though it is same-origin');
|
| + assert_equals(getBackgroundColorForId('id4'), 'rgb(255, 255, 0)');
|
| + }, 'xorigincss3.html should be loaded');
|
| test(function () {
|
| - assert_equals(getBackgroundColorForId('id5'), 'rgba(0, 0, 0, 0)');
|
| - }, 'xorigincss4.html should not be loaded via @import.');
|
| + assert_equals(getBackgroundColorForId('id5'), 'rgb(255, 255, 0)');
|
| + }, 'xorigincss4.html should be loaded via @import.');
|
| test(function () {
|
| assert_equals(getBackgroundColorForId('id6'), 'rgb(255, 255, 0)');
|
| }, 'xorigincss2.css should be loaded.');
|
| test(function () {
|
| - assert_equals(getBackgroundColorForId('id7'), 'rgba(0, 0, 0, 0)');
|
| - }, 'xorigincss5.html should not be loaded.');
|
| + assert_equals(getBackgroundColorForId('id7'), 'rgb(255, 255, 0)');
|
| + }, 'xorigincss5.html should be loaded.');
|
| test(function () {
|
| - assert_equals(getBackgroundColorForId('id8'), 'rgba(0, 0, 0, 0)');
|
| - }, 'xorigincss7.html should not be loaded.');
|
| + assert_equals(getBackgroundColorForId('id8'), 'rgb(255, 255, 0)');
|
| + }, 'xorigincss7.html should be loaded.');
|
| onloadTest.done();
|
| };
|
| </script>
|
|
|