This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// BEFORE | |
if authentication_fetch_flag { | |
let current_url = http_request.borrow().current_url(); | |
if includes_credentials(current_url) { | |
authorization_value = Basic { | |
username: "", | |
password: None | |
}; | |
if let Some(name) = current_url.username() { | |
authorization_value.username = name.to_owned(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub enum DOMManipulationTaskMsg { | |
FireEvent(Atom, Trusted<Reflectable>, EventBubbles, EventCancelable), | |
FireSimpleEvent(Atom, Trusted<Reflectable>), | |
SendStorageNotification(Trusted<Storage>, Option<String>, Option<String>, Option<String>) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (actual_response, response) = match Rc::try_unwrap(actual_response.unwrap()) { | |
Ok(actual_res) => (actual_res, &Rc::try_unwrap(response.unwrap()).ok()), | |
Err(res) => { | |
drop(response); | |
let res = Rc::try_unwrap(res.unwrap()).ok(); | |
(res, &res) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let handler = move |request: HyperRequest, response: HyperResponse| { | |
let redirects = match request.uri { | |
RequestUri::AbsolutePath(url) => | |
url.split("/").collect::<String>().parse::<u32>().unwrap_or(0) + 1, | |
RequestUri::AbsoluteUri(url) => | |
url.path().unwrap().first().unwrap().split("/").collect::<String>().parse::<u32>().unwrap_or(0) + 1, | |
_ => {} | |
}; | |
let url = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
test(function() { | |
var client = new XMLHttpRequest(), | |
urlstart = location.host + location.pathname.replace(/\/[^\/]*$/, '/'), | |
user = token(); | |
client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false) | |
client.setRequestHeader("x-user", user) | |
client.send(null) | |
client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false, user, 'pass') | |
client.setRequestHeader("x-user", user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<script src="/resources/testharness.js"></script> | |
<script src="/resources/testharnessreport.js"></script> | |
<iframe id=testframe src="/common/blank.html"></iframe> | |
<script> | |
var simple_tests = [ | |
{ | |
name: "text.simple", | |
input: "<input name=foo value=bara>", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
efa = function() { | |
var a = _.k.MessageChannel; | |
"undefined" === typeof a && "undefined" !== typeof window && window.postMessage && window.addEventListener && !_.kc("Presto") && (a = function() { | |
var a = window.document.createElement(_.Vea); | |
a.style.display = _.Wa; | |
a.src = ""; | |
window.document.documentElement.appendChild(a); | |
var b = a.contentWindow, | |
a = b.document; | |
a.open(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIR for `main` | |
// source = Fn(NodeId(4)) | |
// pass_name = NLL | |
// disambiguator = after | |
fn main() -> () { | |
let mut _0: (); // return pointer | |
scope 1 { | |
let _1: isize; // "i" in scope 1 at src/test/compile-fail/borrowck/borrowck-and-init.rs:12:9: 12:10 | |
scope 2 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
warning: unused variable: `foo` | |
--> src/test/compile-fail/borrowck/borrowck-and-init.rs:14:9 | |
| | |
14 | let foo = false && { i = 5; true }; | |
| ^^^ | |
| | |
= note: #[warn(unused_variables)] on by default | |
= note: to avoid this warning, consider using `_foo` instead | |
warning: unused variable: `bar` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsafe extern fn open(cx: *mut JSContext, _obj: HandleObject, this: *const XMLHttpRequest, args: *const JSJitMethodCallArgs) -> bool { | |
return wrap_panic(panic::AssertUnwindSafe(|| { | |
let this = &*this; | |
let args = &*args; | |
let argc = args._base.argc_; | |
let argcount = cmp::min(argc, 5); | |
match argcount { | |
2 => { | |
let arg0: ByteString = match FromJSValConvertible::from_jsval(cx, args.get(0), ()) { |
OlderNewer