mirror of
https://github.com/servo/servo.git
synced 2025-06-17 12:54:28 +00:00
URI to URL
trying to pass test - uri
This commit is contained in:
parent
09a39af1c1
commit
97eb594cc2
5 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||||
|
|
|
@ -64,7 +64,7 @@ dictionary BrowserElementErrorEventDetail {
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary BrowserElementLocationChangeEventDetail {
|
dictionary BrowserElementLocationChangeEventDetail {
|
||||||
DOMString uri;
|
DOMString url;
|
||||||
boolean canGoBack;
|
boolean canGoBack;
|
||||||
boolean canGoForward;
|
boolean canGoForward;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue