mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	
		
			
	
	
		
			53 lines
		
	
	
	
		
			900 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			53 lines
		
	
	
	
		
			900 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 
								 | 
							
								load("test-common.js");
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								try {
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        assert(!isStrictMode());
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        'use strict';
							 | 
						||
| 
								 | 
							
								        assert(isStrictMode());
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        "use strict";
							 | 
						||
| 
								 | 
							
								        assert(isStrictMode());
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        `use strict`;
							 | 
						||
| 
								 | 
							
								        assert(!isStrictMode());
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        ;'use strict';
							 | 
						||
| 
								 | 
							
								        assert(!isStrictMode());
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        ;"use strict";
							 | 
						||
| 
								 | 
							
								        assert(!isStrictMode());
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        "use strict";
							 | 
						||
| 
								 | 
							
								        (function() {
							 | 
						||
| 
								 | 
							
								            assert(isStrictMode());
							 | 
						||
| 
								 | 
							
								        })();
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    (function() {
							 | 
						||
| 
								 | 
							
								        assert(!isStrictMode());
							 | 
						||
| 
								 | 
							
								        (function(){
							 | 
						||
| 
								 | 
							
								            "use strict";
							 | 
						||
| 
								 | 
							
								            assert(isStrictMode());
							 | 
						||
| 
								 | 
							
								        })();
							 | 
						||
| 
								 | 
							
								        assert(!isStrictMode());
							 | 
						||
| 
								 | 
							
								    })();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    console.log("PASS");
							 | 
						||
| 
								 | 
							
								} catch (e) {
							 | 
						||
| 
								 | 
							
								    console.log("FAIL: " + e);
							 | 
						||
| 
								 | 
							
								}
							 |