forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backed out changeset bc387540075d (bug 1615405) on evilpie's request …
…CLOSED TREE
- Loading branch information
1 parent
140762b
commit 2a147d1
Showing
9 changed files
with
60 additions
and
21 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
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
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
28 changes: 28 additions & 0 deletions
28
...latform/tests/content-security-policy/generic/eval-typecheck-callout-order.tentative.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,28 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<script src='/resources/testharness.js' nonce='abc'></script> | ||
<script src='/resources/testharnessreport.js' nonce='abc'></script> | ||
<title>Test for order of Type(evalInput) and host callout</title> | ||
</head> | ||
<body> | ||
<div id='log'></div> | ||
|
||
<script nonce='abc'> | ||
test(function() { | ||
assert_throws_js(EvalError, function() { | ||
eval("0"); | ||
}, "eval of a string should reach host callout"); | ||
}, "eval of a string should be checked by CSP"); | ||
|
||
test(function() { | ||
let array = ["0"]; | ||
assert_equals( | ||
eval(array), | ||
array, | ||
"eval is identity when applied to non-strings"); | ||
}, "eval of a non-string should not be checked by CSP"); | ||
</script> | ||
|
||
</body> | ||
</html> |