Skip to content

Commit

Permalink
URI to URL
Browse files Browse the repository at this point in the history
trying to pass test - uri
  • Loading branch information
Coder206 committed Jun 21, 2016
1 parent 09a39af commit 97eb594
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/script/dom/htmliframeelement.rs
Expand Up @@ -379,9 +379,9 @@ impl MozBrowserEventDetailBuilder for HTMLIFrameElement {
MozBrowserEvent::TitleChange(ref string) => {
string.to_jsval(cx, rval);
}
MozBrowserEvent::LocationChange(uri, can_go_back, can_go_forward) => {
MozBrowserEvent::LocationChange(url, can_go_back, can_go_forward) => {
BrowserElementLocationChangeEventDetail {
uri: Some(DOMString::from(uri)),
url: Some(DOMString::from(url)),
canGoBack: Some(can_go_back),
canGoForward: Some(can_go_forward),
}.to_jsval(cx, rval);
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/BrowserElement.webidl
Expand Up @@ -64,7 +64,7 @@ dictionary BrowserElementErrorEventDetail {
};

dictionary BrowserElementLocationChangeEventDetail {
DOMString uri;
DOMString url;
boolean canGoBack;
boolean canGoForward;
};
Expand Down
4 changes: 2 additions & 2 deletions tests/wpt/mozilla/tests/mozilla/mozbrowser/iframe_goback.html
Expand Up @@ -19,8 +19,8 @@
iframe.src = url1;

iframe.addEventListener("mozbrowserlocationchange", e => {
locations.push(e.detail.uri);
if (e.detail.uri == url2) {
locations.push(e.detail.url);
if (e.detail.url == url2) {
iframe.goBack();
}
if (locations.length == expected_locations.length) {
Expand Down
Expand Up @@ -39,7 +39,7 @@
var action_idx = 0;

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.canGoForward);

Expand Down
2 changes: 1 addition & 1 deletion tests/wpt/mozilla/tests/mozilla/mozbrowser/redirect.html
Expand Up @@ -10,7 +10,7 @@
iframe.mozbrowser = "true";
iframe.src = "redirect_init.html?pipe=status(302)|header(Location,redirect_final.html)";
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();
}));
document.body.appendChild(iframe);
Expand Down

0 comments on commit 97eb594

Please sign in to comment.