New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"javascript:" urls: execute in correct global scope #17083
Merged
+154
−93
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fa3e9ab
"javascript:" urls: run in correct global
danielj41 af41769
"javascript:" urls: add web-platform-test
danielj41 ff786a0
"javascript:" urls: clean up after aborting a page load
danielj41 fc23cb1
"javascript:" urls: move test to correct location
danielj41 5d28dd6
"javascript:" urls: clean up js evaluation code
danielj41 6ae6031
"javascript:" urls: evaluate in iframe src attribute
danielj41 709cd3a
"javascript:" urls: remove unnecessary block
danielj41 452db05
"javascript:" urls: update test expectations
danielj41 File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
Loading status checks…
"javascript:" urls: add web-platform-test
- Loading branch information
commit af41769d70e134fa7013127604e8ecbf7ace24a5
| @@ -0,0 +1,28 @@ | ||
| <!doctype html> | ||
jdm
Member
|
||
| <meta charset=utf-8> | ||
| <script src=/resources/testharness.js></script> | ||
| <script src=/resources/testharnessreport.js></script> | ||
|
|
||
| <script> | ||
| var linkStatus = 'link not clicked'; | ||
|
|
||
| function changeStatus() { | ||
| linkStatus = 'link has been clicked'; | ||
| } | ||
| </script> | ||
|
|
||
| <a id="javascript-link" href="javascript:changeStatus()">link</a> | ||
|
|
||
| <script> | ||
| setup({explicit_done:true}); | ||
|
|
||
| document.querySelector("#javascript-link").click(); | ||
|
|
||
| step_timeout(function() { | ||
jdm
Member
|
||
| test(function() { | ||
| assert_equals(linkStatus, "link has been clicked"); | ||
| }, "javascript: scheme urls should be executed in correct global scope"); | ||
|
|
||
| done(); | ||
| }); | ||
| </script> | ||
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Be sure to run
./mach update-manifestafter moving the test (and making any changes to it).