<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[187650] branches/safari-601.1-branch</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/187650">187650</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2015-07-31 09:42:09 -0700 (Fri, 31 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/187489">r187489</a>.  rdar://problem/22010303</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6011branchLayoutTestsChangeLog">branches/safari-601.1-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestsinspectorcssbadmimetypeexpectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/inspector/css/bad-mime-type-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestsmimestandardmodedoesnotloadstylesheetwithtextplainandcssextensionexpectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestsmimestandardmodedoesnotloadstylesheetwithtextplainexpectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestsmisccssrejectanytypeinstrictmodeexpectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss1expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-1-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss2expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-2-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss4expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-4-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss5expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-5-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss7expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-7-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestsplatformmachttptestsmiscacid3expectedtxt">branches/safari-601.1-branch/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt</a></li>
<li><a href="#branchessafari6011branchSourceWebCoreChangeLog">branches/safari-601.1-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6011branchSourceWebCorecssStyleRuleImportcpp">branches/safari-601.1-branch/Source/WebCore/css/StyleRuleImport.cpp</a></li>
<li><a href="#branchessafari6011branchSourceWebCorecssStyleSheetContentscpp">branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.cpp</a></li>
<li><a href="#branchessafari6011branchSourceWebCorecssStyleSheetContentsh">branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.h</a></li>
<li><a href="#branchessafari6011branchSourceWebCorehtmlHTMLLinkElementcpp">branches/safari-601.1-branch/Source/WebCore/html/HTMLLinkElement.cpp</a></li>
<li><a href="#branchessafari6011branchSourceWebCoreloadercacheCachedCSSStyleSheetcpp">branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp</a></li>
<li><a href="#branchessafari6011branchSourceWebCoreloadercacheCachedCSSStyleSheeth">branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks1expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks1html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks2expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks2html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks3expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks3html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks4expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks4html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks5expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks5html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks6expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks6html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks7expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks7html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks8expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks8html">branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss1expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss1html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss2expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss2html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss3expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss3html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss4expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss4html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss5expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss5html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss6expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss6html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss7expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss7html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss8expectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincss8html">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincssinquirksexpectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestssecuritysameorigincssinquirkshtml">branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#branchessafari6011branchLayoutTestshttptestsmisccssacceptanytypeexpectedtxt">branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestshttptestsmisccssacceptanytypehtml">branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6011branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/ChangeLog (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/ChangeLog        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/ChangeLog        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2015-07-31  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
+        Merge r187489
+
+    2015-07-28  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            Allow lax MIME type parsing for same-origin CSS in quirks mode.
+            https://bugs.webkit.org/show_bug.cgi?id=147327
+            &lt;rdar://problem/22010303&gt;
+
+            Reviewed by Zalan Bujtas.
+
+            Add layout test coverage for MIME type parsing for same-origin CSS in
+            quirks mode and not.
+
+            * http/tests/inspector/css/bad-mime-type-expected.txt:
+            * http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension-expected.txt:
+            * http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-expected.txt:
+            * http/tests/misc/css-accept-any-type-expected.txt: Removed.
+            * http/tests/misc/css-accept-any-type.html: Removed.
+            * http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt:
+            * http/tests/security/cross-origin-css-1-expected.txt:
+            * http/tests/security/cross-origin-css-2-expected.txt:
+            * http/tests/security/cross-origin-css-4-expected.txt:
+            * http/tests/security/cross-origin-css-5-expected.txt:
+            * http/tests/security/cross-origin-css-7-expected.txt:
+            * http/tests/security/cross-origin-css-in-quirks-1-expected.txt: Copied from LayoutTests/http/tests/security/cross-origin-css-1-expected.txt.
+            * http/tests/security/cross-origin-css-in-quirks-1.html: Added.
+            * http/tests/security/cross-origin-css-in-quirks-2-expected.txt: Copied from LayoutTests/http/tests/security/cross-origin-css-2-expected.txt.
+            * http/tests/security/cross-origin-css-in-quirks-2.html: Added.
+            * http/tests/security/cross-origin-css-in-quirks-3-expected.txt: Added.
+            * http/tests/security/cross-origin-css-in-quirks-3.html: Added.
+            * http/tests/security/cross-origin-css-in-quirks-4-expected.txt: Added.
+            * http/tests/security/cross-origin-css-in-quirks-4.html: Added.
+            * http/tests/security/cross-origin-css-in-quirks-5-expected.txt: Copied from LayoutTests/http/tests/security/cross-origin-css-5-expected.txt.
+            * http/tests/security/cross-origin-css-in-quirks-5.html: Added.
+            * http/tests/security/cross-origin-css-in-quirks-6-expected.txt: Added.
+            * http/tests/security/cross-origin-css-in-quirks-6.html: Added.
+            * http/tests/security/cross-origin-css-in-quirks-7-expected.txt: Added.
+            * http/tests/security/cross-origin-css-in-quirks-7.html: Added.
+            * http/tests/security/cross-origin-css-in-quirks-8-expected.txt: Added.
+            * http/tests/security/cross-origin-css-in-quirks-8.html: Added.
+            * http/tests/security/same-origin-css-1-expected.txt: Added.
+            * http/tests/security/same-origin-css-1.html: Added.
+            * http/tests/security/same-origin-css-2-expected.txt: Added.
+            * http/tests/security/same-origin-css-2.html: Added.
+            * http/tests/security/same-origin-css-3-expected.txt: Added.
+            * http/tests/security/same-origin-css-3.html: Added.
+            * http/tests/security/same-origin-css-4-expected.txt: Added.
+            * http/tests/security/same-origin-css-4.html: Added.
+            * http/tests/security/same-origin-css-5-expected.txt: Added.
+            * http/tests/security/same-origin-css-5.html: Added.
+            * http/tests/security/same-origin-css-6-expected.txt: Added.
+            * http/tests/security/same-origin-css-6.html: Added.
+            * http/tests/security/same-origin-css-7-expected.txt: Copied from LayoutTests/http/tests/security/cross-origin-css-7-expected.txt.
+            * http/tests/security/same-origin-css-7.html: Added.
+            * http/tests/security/same-origin-css-8-expected.txt: Added.
+            * http/tests/security/same-origin-css-8.html: Added.
+            * http/tests/security/same-origin-css-in-quirks-expected.txt: Added.
+            * http/tests/security/same-origin-css-in-quirks.html: Added.
+            * platform/mac/http/tests/misc/acid3-expected.txt:
+
</ins><span class="cx"> 2015-07-30  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r187278. rdar://problem/19908029
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestsinspectorcssbadmimetypeexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/inspector/css/bad-mime-type-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/inspector/css/bad-mime-type-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/inspector/css/bad-mime-type-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/stylesheet-bad-mime-type.php' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/stylesheet-bad-mime-type.php' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> Tests that showing Web Inspector on a page that has a stylesheet with an invalid MIME type does not crash.
</span><span class="cx"> 
</span><span class="cx"> This test passes if it does not crash.
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestsmimestandardmodedoesnotloadstylesheetwithtextplainandcssextensionexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/mime/resources/style-with-text-plain.php/foo.css' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/mime/resources/style-with-text-plain.php/foo.css' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> This test passes if we do NOT apply the stylesheet (which turns the background color red.) The background color is: rgba(0, 0, 0, 0).
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestsmimestandardmodedoesnotloadstylesheetwithtextplainexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/mime/resources/style-with-text-plain.php' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/mime/resources/style-with-text-plain.php' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> This test passes if we do NOT apply the stylesheet (which turns the background color red.) The background color is: rgba(0, 0, 0, 0).
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestsmisccssacceptanytypeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/stylesheet-bad-mime-type.php' because its MIME type was invalid.
-This was a test for http://bugs.webkit.org/show_bug.cgi?id=11451 REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded): given the security implications of accepting bad MIME types, we're now intentionally breaking this case to match other browsers.
-
-SUCCESS
</del></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestsmisccssacceptanytypehtml"></a>
<div class="delfile"><h4>Deleted: branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type.html (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type.html        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-accept-any-type.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-    &lt;title&gt;&lt;/title&gt;
-    &lt;link rel=&quot;stylesheet&quot; href=&quot;resources/stylesheet-bad-mime-type.php&quot;&gt;
-    &lt;script&gt;
-        function test()
-        {
-            if (window.testRunner)
-                testRunner.dumpAsText();
-            
-            var target = document.getElementById(&quot;target&quot;);
-            var style = getComputedStyle(target);
-            target.innerText = style.position == &quot;relative&quot; ? &quot;FAIL&quot; : &quot;SUCCESS&quot;;
-        }
-    &lt;/script&gt;
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-    &lt;p&gt;
-        This was a test for
-        &lt;i&gt;&lt;a href=&quot;http://bugs.webkit.org/show_bug.cgi?id=11451&quot;&gt;http://bugs.webkit.org/show_bug.cgi?id=11451&lt;/a&gt;
-        REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded)&lt;/i&gt;:
-        given the security implications of accepting bad MIME types, we're now
-        intentionally breaking this case to match other browsers.
-    &lt;/p&gt;
-    &lt;p id=&quot;target&quot;&gt;
-    &lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestsmisccssrejectanytypeinstrictmodeexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/stylesheet-bad-mime-type.php' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/stylesheet-bad-mime-type.php' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> Related test to http://bugs.webkit.org/show_bug.cgi?id=11451 REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded). Making sure that in strict mode we would not load such a stylesheet.
</span><span class="cx"> 
</span><span class="cx"> SUCCESS
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss1expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-1-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-1-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-1-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss1.html' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss1.html' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> 
</span><span class="cx"> PASS Testing cross-origin and MIME behavior for CSS. 
</span><span class="cx"> PASS xorigincss1.html should not be loaded via &lt;link&gt;. 
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss2expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-2-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-2-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-2-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.html' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.html' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> 
</span><span class="cx"> PASS Testing cross-origin and MIME behavior for CSS. 
</span><span class="cx"> PASS xorigincss2.html should not be loaded either via &lt;link&gt; or @import. 
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss4expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-4-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-4-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-4-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/security/resources/xorigincss3.html' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/security/resources/xorigincss3.html' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> 
</span><span class="cx"> PASS Testing cross-origin and MIME behavior for CSS. 
</span><span class="cx"> PASS xorigincss3.html should not be loaded, even though it is same-origin 
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss5expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-5-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-5-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-5-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss4.html' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss4.html' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> 
</span><span class="cx"> PASS Testing cross-origin and MIME behavior for CSS. 
</span><span class="cx"> PASS xorigincss4.html should not be loaded via @import. 
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincss7expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-7-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-7-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-7-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/security/resources/xorigincss5.html' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/security/resources/xorigincss5.html' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> 
</span><span class="cx"> PASS Testing cross-origin and MIME behavior for CSS. 
</span><span class="cx"> PASS xorigincss5.html should not be loaded. 
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks1expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks1expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss1.html' because non CSS MIME types are not allowed for cross-origin stylesheets.
+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss1.html should not be loaded via &lt;link&gt;. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks1htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks1html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-1.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot; href=&quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss1.html&quot;&gt;&lt;/link&gt;
+
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id1'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss1.html should not be loaded via &amp;lt;link&amp;gt;.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id1&quot; class=&quot;id1&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks2expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks2expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.html' because non CSS MIME types are not allowed for cross-origin stylesheets.
+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss2.html should not be loaded either via &lt;link&gt; or @import. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks2htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks2html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-2.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.html&quot;&gt;&lt;/link&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id2'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss2.html should not be loaded either via &amp;lt;link&amp;gt; or @import.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id2&quot; class=&quot;id2&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks3expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks3expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss1.css should be loaded via &lt;link&gt; 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks3htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks3html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-3.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot;
+      href=&quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss1.css&quot;&gt;&lt;/link&gt;
+
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id3'), 'rgb(255, 255, 0)');
+    }, 'xorigincss1.css should be loaded via &amp;lt;link&amp;gt;');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id3&quot; class=&quot;id3&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks4expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks4expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss3.html should be loaded via &lt;link&gt; 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks4htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks4html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-4.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot; href=&quot;resources/xorigincss3.html&quot;&gt;&lt;/link&gt;
+
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id4'), 'rgb(255, 255, 0)');
+    }, 'xorigincss3.html should be loaded via &amp;lt;link&amp;gt;');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id4&quot; class=&quot;id4&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks5expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks5expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss4.html' because non CSS MIME types are not allowed for cross-origin stylesheets.
+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss4.html should not be loaded via @import. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks5htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks5html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-5.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+@import &quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss4.html&quot;;
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id5'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss4.html should not be loaded via @import.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id5&quot; class=&quot;id5&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks6expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks6expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss2.css should be loaded. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks6htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks6html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-6.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+@import &quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.css&quot;;
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id6'), 'rgb(255, 255, 0)');
+    }, 'xorigincss2.css should be loaded.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id6&quot; class=&quot;id6&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks7expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks7expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss5.html should be loaded via @import. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks7htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks7html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-7.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+@import &quot;resources/xorigincss5.html&quot;;
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id7'), 'rgb(255, 255, 0)');
+    }, 'xorigincss5.html should be loaded via @import.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id7&quot; class=&quot;id7&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks8expectedtxtfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks8expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+Check that data: is still allowed for non-CORS cross-origin image fetches.
+
+PASS background image loaded
+
+PASS Testing cross-origin and MIME behavior for CSS. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritycrossorigincssinquirks8htmlfromrev187489trunkLayoutTestshttptestssecuritycrossorigincssinquirks8html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8.html (from rev 187489, trunk/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/cross-origin-css-in-quirks-8.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;html&gt;
+&lt;!--
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+#data-background-url {
+    content: &quot;PASS (image loaded)&quot;;
+    background: url(&quot;data:image/svg+xml;utf8,&lt;svg xmlns='http://www.w3.org/2000/svg' width='0px' height='0px'&gt;&lt;/svg&gt;&quot;);
+}
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;p&gt;Check that data: is still allowed for non-CORS cross-origin image fetches.&lt;/p&gt;
+    &lt;div id=&quot;data-background-url&quot;&gt;PASS background image loaded&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss1expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss1expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-1-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=/security/resources/xorigincss1.html' because non CSS MIME types are not allowed in strict mode.
+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss1.html should not be loaded via &lt;link&gt;. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss1htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss1html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-1.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-1.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot; href=&quot;/resources/redirect.php?url=/security/resources/xorigincss1.html&quot;&gt;&lt;/link&gt;
+
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id1'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss1.html should not be loaded via &amp;lt;link&amp;gt;.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id1&quot; class=&quot;id1&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss2expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss2expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-2-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=/security/resources/xorigincss2.html' because non CSS MIME types are not allowed in strict mode.
+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss2.html should not be loaded either via &lt;link&gt; or @import. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss2htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss2html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-2.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-2.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/resources/redirect.php?url=/security/resources/xorigincss2.html&quot;&gt;&lt;/link&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id2'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss2.html should not be loaded either via &amp;lt;link&amp;gt; or @import.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id2&quot; class=&quot;id2&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss3expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss3expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-3-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss1.css should be loaded via &lt;link&gt; 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss3htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss3html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-3.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-3.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot;
+      href=&quot;/resources/redirect.php?url=/security/resources/xorigincss1.css&quot;&gt;&lt;/link&gt;
+
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id3'), 'rgb(255, 255, 0)');
+    }, 'xorigincss1.css should be loaded via &amp;lt;link&amp;gt;');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id3&quot; class=&quot;id3&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss4expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss4expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-4-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss3.html should not be loaded, even though it is same-origin 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss4htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss4html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-4.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-4.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot; href=&quot;resources/xorigincss3.html&quot;&gt;&lt;/link&gt;
+
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id4'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss3.html should not be loaded, even though it is same-origin');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id4&quot; class=&quot;id4&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss5expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss5expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-5-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/resources/redirect.php?url=/security/resources/xorigincss4.html' because non CSS MIME types are not allowed in strict mode.
+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss4.html should not be loaded via @import. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss5htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss5html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-5.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-5.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+@import &quot;/resources/redirect.php?url=/security/resources/xorigincss4.html&quot;;
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id5'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss4.html should not be loaded via @import.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id5&quot; class=&quot;id5&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss6expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss6expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-6-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss2.css should be loaded. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss6htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss6html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-6.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-6.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+@import &quot;/resources/redirect.php?url=/security/resources/xorigincss2.css&quot;;
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id6'), 'rgb(255, 255, 0)');
+    }, 'xorigincss2.css should be loaded.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id6&quot; class=&quot;id6&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss7expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss7expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-7-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/security/resources/xorigincss5.html' because non CSS MIME types are not allowed in strict mode.
+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss5.html should not be loaded. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss7htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss7html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-7.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-7.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+@import &quot;resources/xorigincss5.html&quot;;
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id7'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss5.html should not be loaded.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id7&quot; class=&quot;id7&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss8expectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincss8expectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-8-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+Check that data: is still allowed for non-CORS cross-origin image fetches.
+
+PASS background image loaded
+
+PASS Testing same-origin and MIME behavior for CSS. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincss8htmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincss8html"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-8.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-8.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;style&gt;
+#data-background-url {
+    content: &quot;PASS (image loaded)&quot;;
+    background: url(&quot;data:image/svg+xml;utf8,&lt;svg xmlns='http://www.w3.org/2000/svg' width='0px' height='0px'&gt;&lt;/svg&gt;&quot;);
+}
+&lt;/style&gt;
+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    onloadTest.done();
+};
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;p&gt;Check that data: is still allowed for non-CORS cross-origin image fetches.&lt;/p&gt;
+    &lt;div id=&quot;data-background-url&quot;&gt;PASS background image loaded&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincssinquirksexpectedtxtfromrev187489trunkLayoutTestshttptestssecuritysameorigincssinquirksexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks-expected.txt (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-in-quirks-expected.txt) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks-expected.txt                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+PASS background image loaded
+
+PASS Testing same-origin and MIME behavior for CSS. 
+PASS xorigincss1.html should be loaded via &lt;link&gt;. 
+PASS xorigincss2.html should be loaded either via &lt;link&gt; or @import. 
+PASS xorigincss1.css should be loaded via &lt;link&gt; 
+PASS xorigincss3.html should be loaded 
+PASS xorigincss4.html should be loaded via @import. 
+PASS xorigincss2.css should be loaded. 
+PASS xorigincss5.html should be loaded. 
+
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestshttptestssecuritysameorigincssinquirkshtmlfromrev187489trunkLayoutTestshttptestssecuritysameorigincssinquirkshtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks.html (from rev 187489, trunk/LayoutTests/http/tests/security/same-origin-css-in-quirks.html) (0 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks.html                                (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/http/tests/security/same-origin-css-in-quirks.html        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+&lt;html&gt;
+&lt;!-- 
+    Note the lack of doctype above: That is intentional. This test
+    MUST be in quirks mode to have any real testing power.
+--&gt;
+&lt;head&gt;
+&lt;title&gt;Same-origin CSS in quirks mode&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;link rel=&quot;stylesheet&quot;
+      href=&quot;/resources/redirect.php?url=/security/resources/xorigincss1.html&quot;&gt;&lt;/link&gt;
+&lt;link rel=&quot;stylesheet&quot;
+      type=&quot;text/css&quot;
+      href=&quot;/resources/redirect.php?url=/security/resources/xorigincss2.html&quot;&gt;&lt;/link&gt;
+&lt;link rel=&quot;stylesheet&quot;
+      href=&quot;/resources/redirect.php?url=/security/resources/xorigincss1.css&quot;&gt;&lt;/link&gt;
+&lt;link rel=&quot;stylesheet&quot;
+      href=&quot;resources/xorigincss3.html&quot;&gt;&lt;/link&gt;
+&lt;style&gt;
+/* Deliberately reuse the same file / class / id on this first one */
+@import &quot;/resources/redirect.php?url=/security/resources/xorigincss2.html&quot;;
+@import &quot;/resources/redirect.php?url=/security/resources/xorigincss4.html&quot;;
+@import &quot;/resources/redirect.php?url=/security/resources/xorigincss2.css&quot;;
+@import &quot;resources/xorigincss5.html&quot;;
+
+/* Check that data: is still allowed for non-CORS cross-origin image fetches. */
+#data-background-url {
+    content: &quot;PASS (image loaded)&quot;;
+    background: url(&quot;data:image/svg+xml;utf8,&lt;svg xmlns='http://www.w3.org/2000/svg' width='0px' height='0px'&gt;&lt;/svg&gt;&quot;);
+}
+&lt;/style&gt;
+&lt;script&gt;
+    function getBackgroundColorForId(id) {
+        return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+    }
+    var onloadTest = async_test(&quot;Testing same-origin and MIME behavior for CSS.&quot;);
+    window.onload = function () {
+        test(function () {
+            assert_equals(getBackgroundColorForId('id1'), 'rgb(255, 255, 0)');
+        }, 'xorigincss1.html should be loaded via &amp;lt;link&amp;gt;.');
+        test(function () {
+            assert_equals(getBackgroundColorForId('id2'), 'rgb(255, 255, 0)');
+        }, 'xorigincss2.html should be loaded either via &amp;lt;link&amp;gt; or @import.');
+        test(function () {
+            assert_equals(getBackgroundColorForId('id3'), 'rgb(255, 255, 0)');
+        }, 'xorigincss1.css should be loaded via &amp;lt;link&amp;gt;');
+        test(function () {
+            assert_equals(getBackgroundColorForId('id4'), 'rgb(255, 255, 0)');
+        }, 'xorigincss3.html should be loaded');
+        test(function () {
+            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'), 'rgb(255, 255, 0)');
+        }, 'xorigincss5.html should be loaded.');
+        onloadTest.done();
+    };
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;id1&quot; class=&quot;id1&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id2&quot; class=&quot;id2&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id3&quot; class=&quot;id3&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id4&quot; class=&quot;id4&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id5&quot; class=&quot;id5&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id6&quot; class=&quot;id6&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id7&quot; class=&quot;id7&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id8&quot; class=&quot;id8&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;data-background-url&quot;&gt;PASS background image loaded&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6011branchLayoutTestsplatformmachttptestsmiscacid3expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/acid3/empty.css' because its MIME type was invalid.
</del><ins>+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/acid3/empty.css' because non CSS MIME types are not allowed in strict mode.
</ins><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx">   RenderView at (0,0) size 800x600
</span><span class="cx"> layer at (20,20) size 644x433
</span></span></pre></div>
<a id="branchessafari6011branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/Source/WebCore/ChangeLog (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/Source/WebCore/ChangeLog        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/Source/WebCore/ChangeLog        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -1,5 +1,59 @@
</span><span class="cx"> 2015-07-31  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r187489
+
+    2015-07-28  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            Allow lax MIME type parsing for same-origin CSS in quirks mode.
+            https://bugs.webkit.org/show_bug.cgi?id=147327
+            &lt;rdar://problem/22010303&gt;
+
+            Reviewed by Zalan Bujtas.
+
+            The change made in r180020 is too strict for the web, and doesn't match Firefox
+            Chrome, or IE's behavior. In particular, it does not respect the same-origin
+            carveout that the HTML spec specifies:
+            https://html.spec.whatwg.org/multipage/semantics.html#link-type-stylesheet
+
+            This patch corrects that oversight and aligns our behavior with other popular
+            browsers.
+
+            This change was adapted from Blink r196678:
+            https://src.chromium.org/viewvc/blink?revision=196678&amp;view=revision
+
+            Tests: http/tests/security/cross-origin-css-in-quirks-1.html
+                   http/tests/security/cross-origin-css-in-quirks-2.html
+                   http/tests/security/cross-origin-css-in-quirks-3.html
+                   http/tests/security/cross-origin-css-in-quirks-4.html
+                   http/tests/security/cross-origin-css-in-quirks-5.html
+                   http/tests/security/cross-origin-css-in-quirks-6.html
+                   http/tests/security/cross-origin-css-in-quirks-7.html
+                   http/tests/security/cross-origin-css-in-quirks-8.html
+                   http/tests/security/same-origin-css-1.html
+                   http/tests/security/same-origin-css-2.html
+                   http/tests/security/same-origin-css-3.html
+                   http/tests/security/same-origin-css-4.html
+                   http/tests/security/same-origin-css-5.html
+                   http/tests/security/same-origin-css-6.html
+                   http/tests/security/same-origin-css-7.html
+                   http/tests/security/same-origin-css-8.html
+                   http/tests/security/same-origin-css-in-quirks.html
+
+            * css/StyleRuleImport.cpp:
+            (WebCore::StyleRuleImport::setCSSStyleSheet):
+            * css/StyleSheetContents.cpp:
+            (WebCore::StyleSheetContents::parseAuthorStyleSheet):
+            * css/StyleSheetContents.h:
+            * html/HTMLLinkElement.cpp:
+            (WebCore::HTMLLinkElement::setCSSStyleSheet):
+            * loader/cache/CachedCSSStyleSheet.cpp:
+            (WebCore::CachedCSSStyleSheet::sheetText):
+            (WebCore::CachedCSSStyleSheet::canUseSheet):
+            (WebCore::CachedCSSStyleSheet::checkNotify): Deleted.
+            * loader/cache/CachedCSSStyleSheet.h:
+
+2015-07-31  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
</ins><span class="cx">         Merge r187466
</span><span class="cx"> 
</span><span class="cx">     2015-07-27  Brady Eidson  &lt;beidson@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6011branchSourceWebCorecssStyleRuleImportcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/Source/WebCore/css/StyleRuleImport.cpp (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/Source/WebCore/css/StyleRuleImport.cpp        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/Source/WebCore/css/StyleRuleImport.cpp        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -70,8 +70,9 @@
</span><span class="cx">     if (!baseURL.isNull())
</span><span class="cx">         context.baseURL = baseURL;
</span><span class="cx"> 
</span><ins>+    Document* document = m_parentStyleSheet ? m_parentStyleSheet-&gt;singleOwnerDocument() : nullptr;
</ins><span class="cx">     m_styleSheet = StyleSheetContents::create(this, href, context);
</span><del>-    m_styleSheet-&gt;parseAuthorStyleSheet(cachedStyleSheet);
</del><ins>+    m_styleSheet-&gt;parseAuthorStyleSheet(cachedStyleSheet, document ? document-&gt;securityOrigin() : nullptr);
</ins><span class="cx"> 
</span><span class="cx">     m_loading = false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6011branchSourceWebCorecssStyleSheetContentscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.cpp (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.cpp        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.cpp        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;PageConsoleClient.h&quot;
</span><span class="cx"> #include &quot;RuleSet.h&quot;
</span><ins>+#include &quot;SecurityOrigin.h&quot;
</ins><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &quot;StyleRule.h&quot;
</span><span class="cx"> #include &quot;StyleRuleImport.h&quot;
</span><span class="lines">@@ -290,16 +291,22 @@
</span><span class="cx">     return it-&gt;value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleSheetContents::parseAuthorStyleSheet(const CachedCSSStyleSheet* cachedStyleSheet)
</del><ins>+void StyleSheetContents::parseAuthorStyleSheet(const CachedCSSStyleSheet* cachedStyleSheet, const SecurityOrigin* securityOrigin)
</ins><span class="cx"> {
</span><ins>+    bool isSameOriginRequest = securityOrigin &amp;&amp; securityOrigin-&gt;canRequest(baseURL());
+    CachedCSSStyleSheet::MIMETypeCheck mimeTypeCheck = isStrictParserMode(m_parserContext.mode) || !isSameOriginRequest ? CachedCSSStyleSheet::MIMETypeCheck::Strict : CachedCSSStyleSheet::MIMETypeCheck::Lax;
</ins><span class="cx">     bool hasValidMIMEType = true;
</span><del>-    String sheetText = cachedStyleSheet-&gt;sheetText(&amp;hasValidMIMEType);
</del><ins>+    String sheetText = cachedStyleSheet-&gt;sheetText(mimeTypeCheck, &amp;hasValidMIMEType);
</ins><span class="cx"> 
</span><span class="cx">     if (!hasValidMIMEType) {
</span><span class="cx">         ASSERT(sheetText.isNull());
</span><span class="cx">         if (auto* document = singleOwnerDocument()) {
</span><del>-            if (auto* page = document-&gt;page())
-                page-&gt;console().addMessage(MessageSource::Security, MessageLevel::Error, &quot;Did not parse stylesheet at '&quot; + cachedStyleSheet-&gt;url().stringCenterEllipsizedToLength() + &quot;' because its MIME type was invalid.&quot;);
</del><ins>+            if (auto* page = document-&gt;page()) {
+                if (isStrictParserMode(m_parserContext.mode))
+                    page-&gt;console().addMessage(MessageSource::Security, MessageLevel::Error, &quot;Did not parse stylesheet at '&quot; + cachedStyleSheet-&gt;url().stringCenterEllipsizedToLength() + &quot;' because non CSS MIME types are not allowed in strict mode.&quot;);
+                else
+                    page-&gt;console().addMessage(MessageSource::Security, MessageLevel::Error, &quot;Did not parse stylesheet at '&quot; + cachedStyleSheet-&gt;url().stringCenterEllipsizedToLength() + &quot;' because non CSS MIME types are not allowed for cross-origin stylesheets.&quot;);
+            }
</ins><span class="cx">         }
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="branchessafari6011branchSourceWebCorecssStyleSheetContentsh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.h (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.h        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/Source/WebCore/css/StyleSheetContents.h        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> class Node;
</span><span class="cx"> class StyleRuleBase;
</span><span class="cx"> class StyleRuleImport;
</span><ins>+class SecurityOrigin;
</ins><span class="cx"> 
</span><span class="cx"> class StyleSheetContents : public RefCounted&lt;StyleSheetContents&gt; {
</span><span class="cx"> public:
</span><span class="lines">@@ -62,7 +63,7 @@
</span><span class="cx"> 
</span><span class="cx">     const AtomicString&amp; determineNamespace(const AtomicString&amp; prefix);
</span><span class="cx"> 
</span><del>-    void parseAuthorStyleSheet(const CachedCSSStyleSheet*);
</del><ins>+    void parseAuthorStyleSheet(const CachedCSSStyleSheet*, const SecurityOrigin*);
</ins><span class="cx">     WEBCORE_EXPORT bool parseString(const String&amp;);
</span><span class="cx">     bool parseStringAtPosition(const String&amp;, const TextPosition&amp;, bool createdByParser);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6011branchSourceWebCorehtmlHTMLLinkElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/Source/WebCore/html/HTMLLinkElement.cpp (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/Source/WebCore/html/HTMLLinkElement.cpp        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/Source/WebCore/html/HTMLLinkElement.cpp        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx">     m_sheet-&gt;setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(m_media));
</span><span class="cx">     m_sheet-&gt;setTitle(title());
</span><span class="cx"> 
</span><del>-    styleSheet.get().parseAuthorStyleSheet(cachedStyleSheet);
</del><ins>+    styleSheet.get().parseAuthorStyleSheet(cachedStyleSheet, document().securityOrigin());
</ins><span class="cx"> 
</span><span class="cx">     m_loading = false;
</span><span class="cx">     styleSheet.get().notifyLoadedSheet(cachedStyleSheet);
</span></span></pre></div>
<a id="branchessafari6011branchSourceWebCoreloadercacheCachedCSSStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -78,9 +78,9 @@
</span><span class="cx">     return m_decoder-&gt;encoding().name();
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-const String CachedCSSStyleSheet::sheetText(bool* hasValidMIMEType) const
</del><ins>+const String CachedCSSStyleSheet::sheetText(MIMETypeCheck mimeTypeCheck, bool* hasValidMIMEType) const
</ins><span class="cx"> { 
</span><del>-    if (!m_data || m_data-&gt;isEmpty() || !canUseSheet(hasValidMIMEType))
</del><ins>+    if (!m_data || m_data-&gt;isEmpty() || !canUseSheet(mimeTypeCheck, hasValidMIMEType))
</ins><span class="cx">         return String();
</span><span class="cx">     
</span><span class="cx">     if (!m_decodedSheetText.isNull())
</span><span class="lines">@@ -113,11 +113,14 @@
</span><span class="cx">         c-&gt;setCSSStyleSheet(m_resourceRequest.url(), m_response.url(), m_decoder-&gt;encoding().name(), this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CachedCSSStyleSheet::canUseSheet(bool* hasValidMIMEType) const
</del><ins>+bool CachedCSSStyleSheet::canUseSheet(MIMETypeCheck mimeTypeCheck, bool* hasValidMIMEType) const
</ins><span class="cx"> {
</span><span class="cx">     if (errorOccurred())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    if (mimeTypeCheck == MIMETypeCheck::Lax)
+        return true;
+
</ins><span class="cx">     // This check exactly matches Firefox.  Note that we grab the Content-Type
</span><span class="cx">     // header directly because we want to see what the value is BEFORE content
</span><span class="cx">     // sniffing.  Firefox does this by setting a &quot;type hint&quot; on the channel.
</span></span></pre></div>
<a id="branchessafari6011branchSourceWebCoreloadercacheCachedCSSStyleSheeth"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h (187649 => 187650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h        2015-07-31 16:35:39 UTC (rev 187649)
+++ branches/safari-601.1-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h        2015-07-31 16:42:09 UTC (rev 187650)
</span><span class="lines">@@ -41,13 +41,14 @@
</span><span class="cx">         CachedCSSStyleSheet(const ResourceRequest&amp;, const String&amp; charset, SessionID);
</span><span class="cx">         virtual ~CachedCSSStyleSheet();
</span><span class="cx"> 
</span><del>-        const String sheetText(bool* hasValidMIMEType = nullptr) const;
</del><ins>+        enum class MIMETypeCheck { Strict, Lax };
+        const String sheetText(MIMETypeCheck = MIMETypeCheck::Strict, bool* hasValidMIMEType = nullptr) const;
</ins><span class="cx"> 
</span><span class="cx">         PassRefPtr&lt;StyleSheetContents&gt; restoreParsedStyleSheet(const CSSParserContext&amp;, CachePolicy);
</span><span class="cx">         void saveParsedStyleSheet(Ref&lt;StyleSheetContents&gt;&amp;&amp;);
</span><span class="cx"> 
</span><span class="cx">     private:
</span><del>-        bool canUseSheet(bool* hasValidMIMEType) const;
</del><ins>+        bool canUseSheet(MIMETypeCheck, bool* hasValidMIMEType) const;
</ins><span class="cx">         virtual bool mayTryReplaceEncodedData() const override { return true; }
</span><span class="cx"> 
</span><span class="cx">         virtual void didAddClient(CachedResourceClient*) override;
</span></span></pre>
</div>
</div>

</body>
</html>