mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			52 lines
		
	
	
	
		
			900 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			52 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);
 | |
| }
 | 
