mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:32:44 +00:00 
			
		
		
		
	 ac82585ae7
			
		
	
	
		ac82585ae7
		
	
	
	
	
		
			
			This verifies that an Invalid State Error is being thrown when XHR.open() has not been called before calling XHR::send().
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			323 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			323 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script src="../include.js"></script>
 | |
| <script>
 | |
|     test(() => {
 | |
|         const INVALID_STATE_ERR = 11;
 | |
|         try {
 | |
|             const xhr = new XMLHttpRequest();
 | |
|             xhr.send();
 | |
|         }
 | |
|         catch (e) {
 | |
|             if (e.code === INVALID_STATE_ERR)
 | |
|                 println("PASS");
 | |
|         }
 | |
|     });
 | |
| </script>
 |