mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-30 21:01:00 +00:00 
			
		
		
		
	
		
			
	
	
		
			22 lines
		
	
	
	
		
			485 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			22 lines
		
	
	
	
		
			485 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|   | load("test-common.js"); | ||
|  | 
 | ||
|  | try { | ||
|  |     var f = function () { } | ||
|  |     assert(f.name === ""); | ||
|  |     assert((f.name = "f") === "f"); | ||
|  |     assert(f.name === ""); | ||
|  | 
 | ||
|  |     function foo() { } | ||
|  |     assert(foo.name === "foo"); | ||
|  |     assert((foo.name = "bar") === "bar"); | ||
|  |     assert(foo.name === "foo"); | ||
|  | 
 | ||
|  |     assert(console.log.name === "log"); | ||
|  |     assert((console.log.name = "warn") === "warn"); | ||
|  |     assert(console.log.name === "log"); | ||
|  | 
 | ||
|  |     console.log("PASS"); | ||
|  | } catch (e) { | ||
|  |     console.log("FAIL: " + e); | ||
|  | } |