Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd test for get action URL planned navigation #9735
Conversation
highfive
commented
Feb 24, 2016
|
r? @Manishearth |
|
Probably because data: URLs are still considered cross-origin right now. |
|
@jdm Is this something that will be fixed by Fetch? Or is this XHR specific? |
|
I don't believe it's specific to either. It's something we'll need to deal with in the constellation code that decides which script thread to run a new load in. |
| "<form id=testform method=get action=\"" + test_obj.action +"\"></form>"; | ||
| testframe.onload = function() { | ||
| t.step(function (){ | ||
| var body_text = testframe.contentWindow.location.toString(); |
This comment has been minimized.
This comment has been minimized.
Manishearth
Feb 24, 2016
Member
Can we use an HTML data URI instead that does a postMessage() to the parent?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6c517e9
to
e6bb431
| } | ||
| test_obj = tests[0]; | ||
| var testframe = document.getElementById("testframe"); | ||
| var testdocument = testframe.contentWindow.document; |
This comment has been minimized.
This comment has been minimized.
KiChjang
Feb 24, 2016
Author
Member
This here is throwing me errors saying that testframe.contentWindow is null.
| var tests = [ | ||
| { | ||
| name: "Navigating to URL with a http scheme", | ||
| action: "data:text/html,%3Cscript%3Eparent.postMessage%28%27hello%20world%27%2C%27" + origin +"%27%29%3B%3C%2Fscript%3E", |
This comment has been minimized.
This comment has been minimized.
e6bb431
to
821eb0c
|
|
|
So since |
|
If we don't use postMessage, what was stopping it from passing in Servo again? It kind of sucks that we still don't have test coverage for planned navigation even with this merged. |
|
It's this line here: var body_text = testframe.contentWindow.location.toString();It fails on |
|
If the form action is a same-origin HTML page instead of a data URL does it work? |
|
It should. |
|
|
821eb0c
to
1e5b93e
|
Yes, it works under an HTTP scheme. |
1e5b93e
to
986cb36
|
|
f75c70d
to
084e86d
|
@bors-servo r=jdm |
|
|
Add test for get action URL planned navigation Mutate action URL doesn't need to be tested, since the existing urlencoded.html already tests it. This new test currently fails, because of the weirdness in calling `testframe.contentWindow`. It returns null for this test, but not for urlencoded.html. Can't figure out why. Fixes #9690 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9735) <!-- Reviewable:end -->
|
|
|
@bors retry |
|
@bors-servo retry |
Add test for get action URL planned navigation Mutate action URL doesn't need to be tested, since the existing urlencoded.html already tests it. This new test currently fails, because of the weirdness in calling `testframe.contentWindow`. It returns null for this test, but not for urlencoded.html. Can't figure out why. Fixes #9690 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9735) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Add test for get action URL planned navigation Mutate action URL doesn't need to be tested, since the existing urlencoded.html already tests it. This new test currently fails, because of the weirdness in calling `testframe.contentWindow`. It returns null for this test, but not for urlencoded.html. Can't figure out why. Fixes #9690 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9735) <!-- Reviewable:end -->
|
|
KiChjang commentedFeb 24, 2016
Mutate action URL doesn't need to be tested, since the existing urlencoded.html already tests it.
This new test currently fails, because of the weirdness in calling
testframe.contentWindow. It returns null for this test, but not for urlencoded.html. Can't figure out why.Fixes #9690