-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 259548.816@safari-7615-branch (8437c23). https://bugs.web…
…kit.org/show_bug.cgi?id=256686 Incorrect CORS mode for ApplicationManifest https://bugs.webkit.org/show_bug.cgi?id=256686 rdar://109154572 Reviewed by Brent Fulgham. * LayoutTests/TestExpectations: * LayoutTests/http/wpt/content-security-policy/manifest.json: Added. * LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked-cross-origin.sub-expected.txt: Added. * LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked-cross-origin.sub.html: Added. * LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked-cross-origin.sub.html.headers: Added. * LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked-expected.txt: Added. * LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked.html: Added. * LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked.html.headers: Added. * LayoutTests/platform/ios-wk2/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/loader/ApplicationManifestLoader.cpp: (WebCore::ApplicationManifestLoader::startLoading): * Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/259548.816@safari-7615-branch
- Loading branch information
1 parent
3a117ed
commit b140015
Showing
12 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "manifest" | ||
} |
5 changes: 5 additions & 0 deletions
5
...s/http/wpt/content-security-policy/sandbox-manifest-blocked-cross-origin.sub-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
http://localhost:8800/WebKit/content-security-policy/sandbox-manifest-blocked-cross-origin.sub.html - didFinishLoading | ||
CONSOLE MESSAGE: Origin null is not allowed by Access-Control-Allow-Origin. Status code: 200 | ||
http://127.0.0.1:8800/WebKit/content-security-policy/manifest.json - didFailLoadingWithError: <NSError domain , code 0, failing URL "http://127.0.0.1:8800/WebKit/content-security-policy/manifest.json"> | ||
CONSOLE MESSAGE: Fetched manifest: http://127.0.0.1:8800/WebKit/content-security-policy/manifest.json | ||
|
16 changes: 16 additions & 0 deletions
16
LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked-cross-origin.sub.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<head> | ||
<link | ||
rel="manifest" | ||
href="http://{{hosts[alt][]}}:{{ports[http][0]}}/WebKit/content-security-policy/manifest.json" | ||
/> | ||
</head> | ||
<script> | ||
testRunner?.dumpAsText(); | ||
testRunner?.dumpResourceLoadCallbacks(); | ||
testRunner?.waitUntilDone(); | ||
testRunner?.getApplicationManifestThen(() => { | ||
const elem = document.querySelector("link"); | ||
console.log(`Fetched manifest: ${elem.href}`); | ||
testRunner.notifyDone(); | ||
}); | ||
</script> |
1 change: 1 addition & 0 deletions
1
...s/http/wpt/content-security-policy/sandbox-manifest-blocked-cross-origin.sub.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Content-Security-Policy: sandbox allow-scripts; |
5 changes: 5 additions & 0 deletions
5
LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
http://localhost:8800/WebKit/content-security-policy/sandbox-manifest-blocked.html - didFinishLoading | ||
CONSOLE MESSAGE: Origin null is not allowed by Access-Control-Allow-Origin. Status code: 200 | ||
http://localhost:8800/WebKit/content-security-policy/manifest.json - didFailLoadingWithError: <NSError domain , code 0, failing URL "http://localhost:8800/WebKit/content-security-policy/manifest.json"> | ||
CONSOLE MESSAGE: Fetched manifest: http://localhost:8800/WebKit/content-security-policy/manifest.json | ||
|
13 changes: 13 additions & 0 deletions
13
LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<head> | ||
<link rel="manifest" href="manifest.json" /> | ||
</head> | ||
<script> | ||
testRunner?.dumpAsText(); | ||
testRunner?.dumpResourceLoadCallbacks(); | ||
testRunner?.waitUntilDone(); | ||
testRunner?.getApplicationManifestThen(() => { | ||
const elem = document.querySelector("link"); | ||
console.log(`Fetched manifest: ${elem.href}`); | ||
testRunner.notifyDone(); | ||
}); | ||
</script> |
1 change: 1 addition & 0 deletions
1
LayoutTests/http/wpt/content-security-policy/sandbox-manifest-blocked.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Content-Security-Policy: sandbox allow-scripts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters