mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:12:43 +00:00 
			
		
		
		
	LibWeb: Add a simple internals objects only available during testing
				
					
				
			This object is available as `window.internals` (or just `internals`) and is only accessible while running in "test mode". This first version only has one API: gc(), which triggers a garbage collection immediately. In the future, we can add more APIs here to help us test parts of the engine that are hard or impossible to reach via public web APIs.
This commit is contained in:
		
							parent
							
								
									ba236e3f21
								
							
						
					
					
						commit
						ec24d7555a
					
				
					 14 changed files with 109 additions and 5 deletions
				
			
		|  | @ -23,6 +23,7 @@ | |||
| #include <LibJS/Bytecode/Interpreter.h> | ||||
| #include <LibMain/Main.h> | ||||
| #include <LibWeb/Bindings/MainThreadVM.h> | ||||
| #include <LibWeb/HTML/Window.h> | ||||
| #include <LibWeb/Loader/ContentFilter.h> | ||||
| #include <LibWeb/Loader/FrameLoader.h> | ||||
| #include <LibWeb/Loader/ResourceLoader.h> | ||||
|  | @ -89,6 +90,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|         Web::WebSockets::WebSocketClientManager::initialize(Ladybird::WebSocketClientManagerQt::create()); | ||||
|     } | ||||
| 
 | ||||
|     Web::HTML::Window::set_internals_object_exposed(is_layout_test_mode); | ||||
| 
 | ||||
|     JS::Bytecode::Interpreter::set_enabled(use_javascript_bytecode); | ||||
| 
 | ||||
|     VERIFY(webcontent_fd_passing_socket >= 0); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling