Auto merge of #11789 - Coder206:uri, r=asajeffrey

URI to URL

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #11450 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes (Windows 10 was never able to run them...)

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11789)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-20 20:57:52 -05:00 committed by GitHub
commit b9b289c4be
5 changed files with 7 additions and 7 deletions

View file

@ -379,9 +379,9 @@ impl MozBrowserEventDetailBuilder for HTMLIFrameElement {
MozBrowserEvent::TitleChange(ref string) => { MozBrowserEvent::TitleChange(ref string) => {
string.to_jsval(cx, rval); string.to_jsval(cx, rval);
} }
MozBrowserEvent::LocationChange(uri, can_go_back, can_go_forward) => { MozBrowserEvent::LocationChange(url, can_go_back, can_go_forward) => {
BrowserElementLocationChangeEventDetail { BrowserElementLocationChangeEventDetail {
uri: Some(DOMString::from(uri)), url: Some(DOMString::from(url)),
canGoBack: Some(can_go_back), canGoBack: Some(can_go_back),
canGoForward: Some(can_go_forward), canGoForward: Some(can_go_forward),
}.to_jsval(cx, rval); }.to_jsval(cx, rval);

View file

@ -64,7 +64,7 @@ dictionary BrowserElementErrorEventDetail {
}; };
dictionary BrowserElementLocationChangeEventDetail { dictionary BrowserElementLocationChangeEventDetail {
DOMString uri; DOMString url;
boolean canGoBack; boolean canGoBack;
boolean canGoForward; boolean canGoForward;
}; };

View file

@ -19,8 +19,8 @@ async_test(function(t) {
iframe.src = url1; iframe.src = url1;
iframe.addEventListener("mozbrowserlocationchange", e => { iframe.addEventListener("mozbrowserlocationchange", e => {
locations.push(e.detail.uri); locations.push(e.detail.url);
if (e.detail.uri == url2) { if (e.detail.url == url2) {
iframe.goBack(); iframe.goBack();
} }
if (locations.length == expected_locations.length) { if (locations.length == expected_locations.length) {

View file

@ -39,7 +39,7 @@ async_test(function(t) {
var action_idx = 0; var action_idx = 0;
iframe.addEventListener("mozbrowserlocationchange", e => { iframe.addEventListener("mozbrowserlocationchange", e => {
received_events.push(e.detail.uri); received_events.push(e.detail.url);
received_events.push(e.detail.canGoBack); received_events.push(e.detail.canGoBack);
received_events.push(e.detail.canGoForward); received_events.push(e.detail.canGoForward);

View file

@ -10,7 +10,7 @@
iframe.mozbrowser = "true"; iframe.mozbrowser = "true";
iframe.src = "redirect_init.html?pipe=status(302)|header(Location,redirect_final.html)"; iframe.src = "redirect_init.html?pipe=status(302)|header(Location,redirect_final.html)";
iframe.addEventListener("mozbrowserlocationchange", t.step_func(e => { iframe.addEventListener("mozbrowserlocationchange", t.step_func(e => {
assert_equals(e.detail.uri, new URL("redirect_final.html", location).href); assert_equals(e.detail.url, new URL("redirect_final.html", location).href);
t.done(); t.done();
})); }));
document.body.appendChild(iframe); document.body.appendChild(iframe);