mirror of
				https://github.com/mozilla/gecko-dev.git
				synced 2025-11-04 10:18:41 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			532 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			532 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
function run_test() {
 | 
						|
  var x = new XMLHttpRequest({ mozAnon: true, mozSystem: false });
 | 
						|
  Assert.ok(x.mozAnon);
 | 
						|
  Assert.ok(x.mozSystem); // Because we're system principal
 | 
						|
 | 
						|
  x = new XMLHttpRequest({ mozAnon: true });
 | 
						|
  Assert.ok(x.mozAnon);
 | 
						|
  Assert.ok(x.mozSystem);
 | 
						|
 | 
						|
  x = new XMLHttpRequest();
 | 
						|
  Assert.ok(x.mozAnon);
 | 
						|
  Assert.ok(x.mozSystem);
 | 
						|
 | 
						|
  Services.prefs.setBoolPref(
 | 
						|
    "network.fetch.systemDefaultsToOmittingCredentials",
 | 
						|
    false
 | 
						|
  );
 | 
						|
  x = new XMLHttpRequest();
 | 
						|
  Assert.ok(!x.mozAnon);
 | 
						|
  Assert.ok(x.mozSystem);
 | 
						|
}
 |