Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r245028 - Correct JSON parser to address unterminated escape ch…
…aracter https://bugs.webkit.org/show_bug.cgi?id=197582 <rdar://problem/50459177> Reviewed by Alex Christensen. Source/WTF: Correct JSON parser code to properly deal with unterminated escape characters. * wtf/JSONValues.cpp: (WTF::JSONImpl::decodeString): (WTF::JSONImpl::parseStringToken): LayoutTests: * applicationmanifest/display-mode-bad-manifest-expected.txt: * applicationmanifest/display-mode-bad-manifest.html: * applicationmanifest/resources/bad.manifest: Added. * js/resources/JSON-parse.js: Add test case for unterminated escape. * js/dom/JSON-parse-expected.txt: Add new test case. * TestWebKitAPI/Tests/WTF/JSONValue.cpp: Add new false test case for unterminated escape character.
- Loading branch information
1 parent
4cfc4b8
commit 0b5df36
Showing
9 changed files
with
97 additions
and
3 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
1 change: 1 addition & 0 deletions
1
LayoutTests/applicationmanifest/display-mode-bad-manifest-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 @@ | ||
(display-mode) (display-mode: browser) |
32 changes: 32 additions & 0 deletions
32
LayoutTests/applicationmanifest/display-mode-bad-manifest.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,32 @@ | ||
<!-- webkit-test-runner [ applicationManifest=resources/bad.manifest ] --> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
</script> | ||
<style> | ||
div { display: none; } | ||
@media (display-mode) { | ||
.display-mode-null { display: inline; } | ||
} | ||
@media (display-mode: browser) { | ||
.display-mode-browser { display: inline; } | ||
} | ||
@media (display-mode: minimal-ui) { | ||
.display-mode-minimal-ui { display: inline; } | ||
} | ||
@media (display-mode: standalone) { | ||
.display-mode-standalone { display: inline; } | ||
} | ||
@media (display-mode: fullscreen) { | ||
.display-mode-fullscreen { display: inline; } | ||
} | ||
@media (display-mode: invalid-value) { | ||
.display-mode-invalid-value { display: inline; } | ||
} | ||
</style> | ||
<div class="display-mode-null">(display-mode)</div> | ||
<div class="display-mode-browser">(display-mode: browser)</div> | ||
<div class="display-mode-minimal-ui">(display-mode: minimal-ui)</div> | ||
<div class="display-mode-standalone">(display-mode: standalone)</div> | ||
<div class="display-mode-fullscreen">(display-mode: fullscreen)</div> | ||
<div class="display-mode-invalid-value">(display-mode: invalid-value)</div> |
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 @@ | ||
"\ |
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
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