Diff
Modified: trunk/LayoutTests/ChangeLog (209783 => 209784)
--- trunk/LayoutTests/ChangeLog 2016-12-14 00:18:17 UTC (rev 209783)
+++ trunk/LayoutTests/ChangeLog 2016-12-14 00:20:11 UTC (rev 209784)
@@ -1,3 +1,17 @@
+2016-12-13 Joseph Pecoraro <[email protected]>
+
+ REGRESSION(r204163): Web Inspector: Page crashes when Inspector tries to load insecure SourceMap
+ https://bugs.webkit.org/show_bug.cgi?id=165806
+ <rdar://problem/28169025>
+
+ Reviewed by Alex Christensen.
+
+ * http/tests/inspector/network/loadResource-insecure-resource-expected.txt: Added.
+ * http/tests/inspector/network/loadResource-insecure-resource.html: Added.
+ * http/tests/inspector/network/resource-timing.html:
+ * http/tests/inspector/resources/inspector-test.js:
+ (runTestHTTPS):
+
2016-12-13 Ryan Haddad <[email protected]>
Rebaseline js/dom/global-constructors-attributes.html after r209777.
Added: trunk/LayoutTests/http/tests/inspector/network/loadResource-insecure-resource-expected.txt (0 => 209784)
--- trunk/LayoutTests/http/tests/inspector/network/loadResource-insecure-resource-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/loadResource-insecure-resource-expected.txt 2016-12-14 00:20:11 UTC (rev 209784)
@@ -0,0 +1,14 @@
+CONSOLE MESSAGE: [blocked] The page at https://127.0.0.1:8443/inspector/network/loadResource-insecure-resource.html was not allowed to display insecure content from http://127.0.0.0:8000/inspector/network/resources/data.json?2.
+
+Tests loading resources on a secure page with Network.loadResource.
+
+
+== Running test suite: Network.loadResource.MixedContent
+-- Running test case: Network.loadResource.MixedContent.SecureSuccess
+PASS: Should not be an error loading a secure resource.
+PASS: Should be a 200 OK status.
+
+-- Running test case: Network.loadResource.MixedContent.InsecureFailure
+PASS: Should be an error loading an insecure resource.
+PASS: Loading resource for inspector failed access control check
+
Added: trunk/LayoutTests/http/tests/inspector/network/loadResource-insecure-resource.html (0 => 209784)
--- trunk/LayoutTests/http/tests/inspector/network/loadResource-insecure-resource.html (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/loadResource-insecure-resource.html 2016-12-14 00:20:11 UTC (rev 209784)
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script>
+function test()
+{
+ let suite = InspectorTest.createAsyncSuite("Network.loadResource.MixedContent");
+
+ suite.addTestCase({
+ name: "Network.loadResource.MixedContent.SecureSuccess",
+ description: "Ensure trying to load an https resource from a secure page succeeds.",
+ test(resolve, reject) {
+ const url = ""
+ NetworkAgent.loadResource(WebInspector.frameResourceManager.mainFrame.id, url, (error, content, mimeType, status) => {
+ InspectorTest.expectThat(!error, "Should not be an error loading a secure resource.");
+ InspectorTest.expectEqual(status, 200, "Should be a 200 OK status.");
+ resolve();
+ });
+ }
+ });
+
+ suite.addTestCase({
+ name: "Network.loadResource.MixedContent.InsecureFailure",
+ description: "Ensure trying to load an http resource from a secure page fails.",
+ test(resolve, reject) {
+ const url = ""
+ NetworkAgent.loadResource(WebInspector.frameResourceManager.mainFrame.id, url, (error, content, mimeType, status) => {
+ InspectorTest.expectThat(error, "Should be an error loading an insecure resource.");
+ InspectorTest.pass(error);
+ resolve();
+ });
+ }
+ });
+
+ suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body _onload_="runTestHTTPS()">
+<p>Tests loading resources on a secure page with Network.loadResource.</p>
+</body>
+</html>
Modified: trunk/LayoutTests/http/tests/inspector/network/resource-timing.html (209783 => 209784)
--- trunk/LayoutTests/http/tests/inspector/network/resource-timing.html 2016-12-14 00:18:17 UTC (rev 209783)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-timing.html 2016-12-14 00:20:11 UTC (rev 209784)
@@ -10,9 +10,10 @@
document.body.appendChild(img);
}
-function test() {
+function test()
+{
let suite = InspectorTest.createAsyncSuite("ResourceTimingData");
- InspectorTest.debug();
+
suite.addTestCase({
name: "CheckResourceTimingInformationForResource",
description: "Check if a resource has timing information.",
Modified: trunk/LayoutTests/http/tests/inspector/resources/inspector-test.js (209783 => 209784)
--- trunk/LayoutTests/http/tests/inspector/resources/inspector-test.js 2016-12-14 00:18:17 UTC (rev 209783)
+++ trunk/LayoutTests/http/tests/inspector/resources/inspector-test.js 2016-12-14 00:20:11 UTC (rev 209784)
@@ -101,6 +101,24 @@
testRunner.evaluateInWebInspector(testFunctionCodeString);
}
+function runTestHTTPS()
+{
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ let url = "" URL(document.URL);
+ if (url.protocol !== "https:") {
+ url.protocol = "https:";
+ url.port = "8443";
+ window.location.href = ""
+ return;
+ }
+
+ runTest();
+}
+
TestPage.completeTest = function()
{
// Don't try to use testRunner if running through the browser.
Modified: trunk/Source/WebCore/ChangeLog (209783 => 209784)
--- trunk/Source/WebCore/ChangeLog 2016-12-14 00:18:17 UTC (rev 209783)
+++ trunk/Source/WebCore/ChangeLog 2016-12-14 00:20:11 UTC (rev 209784)
@@ -1,3 +1,18 @@
+2016-12-13 Joseph Pecoraro <[email protected]>
+
+ REGRESSION(r204163): Web Inspector: Page crashes when Inspector tries to load insecure SourceMap
+ https://bugs.webkit.org/show_bug.cgi?id=165806
+ <rdar://problem/28169025>
+
+ Reviewed by Alex Christensen.
+
+ Test: http/tests/inspector/network/loadResource-insecure-resource.html
+
+ * inspector/InspectorNetworkAgent.cpp:
+ (WebCore::InspectorNetworkAgent::loadResource):
+ DocumentThreadableLoader now triggers the ThreadableLoaderClient's didFail
+ callback, so this didFailLoaderCreation is now redundent and incorrect.
+
2016-12-13 Dave Hyatt <[email protected]>
[CSS Parser] Enhance fast path translate transforms to allow percentages
Modified: trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp (209783 => 209784)
--- trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp 2016-12-14 00:18:17 UTC (rev 209783)
+++ trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp 2016-12-14 00:20:11 UTC (rev 209784)
@@ -129,12 +129,6 @@
dispose();
}
- void didFailLoaderCreation()
- {
- m_callback->sendFailure(ASCIILiteral("Could not create a loader"));
- dispose();
- }
-
void setLoader(RefPtr<ThreadableLoader>&& loader)
{
m_loader = WTFMove(loader);
@@ -683,14 +677,11 @@
options.credentials = FetchOptions::Credentials::SameOrigin;
options.contentSecurityPolicyEnforcement = ContentSecurityPolicyEnforcement::DoNotEnforce;
- // InspectorThreadableLoaderClient deletes itself when the load completes.
+ // InspectorThreadableLoaderClient deletes itself when the load completes or fails.
InspectorThreadableLoaderClient* inspectorThreadableLoaderClient = new InspectorThreadableLoaderClient(callback.copyRef());
-
auto loader = DocumentThreadableLoader::create(*document, *inspectorThreadableLoaderClient, WTFMove(request), options);
- if (!loader) {
- inspectorThreadableLoaderClient->didFailLoaderCreation();
+ if (!loader)
return;
- }
// If the load already completed, inspectorThreadableLoaderClient will have been deleted and we will have already called the callback.
if (!callback->isActive())
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (209783 => 209784)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-12-14 00:18:17 UTC (rev 209783)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-12-14 00:20:11 UTC (rev 209784)
@@ -331,7 +331,6 @@
bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const URL& url) const
{
-
if (!canRequestInContentDispositionAttachmentSandbox(type, url))
return false;