summaryrefslogtreecommitdiff
path: root/Userland/test-web.cpp
AgeCommit message (Collapse)Author
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling
2021-01-09Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.Everything: The modifications in this commit were automatically made using the following command: find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2020-12-21Everywhere: Switch from (void) to [[maybe_unused]] (#4473)Lenny Maiorani
Problem: - `(void)` simply casts the expression to void. This is understood to indicate that it is ignored, but this is really a compiler trick to get the compiler to not generate a warning. Solution: - Use the `[[maybe_unused]]` attribute to indicate the value is unused. Note: - Functions taking a `(void)` argument list have also been changed to `()` because this is not needed and shows up in the same grep command.
2020-12-13LibWeb: Make HTMLDocumentParser take an existing documentAndreas Kling
We shouldn't really be creating the document objects inside the parser, since that makes it hard to hook up e.g JavaScript bindings early on.
2020-10-23LibWeb: Fix Document construction mishap in <template> elementAndreas Kling
Ref-counted objects must not be stack allocated. Make DOM::Document's constructor private to avoid this issue. (I wish we could mark classes as heap-only..)
2020-10-04LibJS: Remove Interpreter::call()Andreas Kling
Just use VM::call() directly everywhere.
2020-09-27LibJS: Remove use of Interpreter& in JSONObject codeAndreas Kling
2020-09-27LibJS: Make native function/property callbacks take VM, not InterpreterAndreas Kling
More work on decoupling the general runtime from Interpreter. The goal is becoming clearer. Interpreter should be one possible way to execute code inside a VM. In the future we might have other ways :^)
2020-09-27LibJS: Move most of Interpreter into VMAndreas Kling
This patch moves the exception state, call stack and scope stack from Interpreter to VM. I'm doing this to help myself discover what the split between Interpreter and VM should be, by shuffling things around and seeing what falls where. With these changes, we no longer have a persistent lexical environment for the current global object on the Interpreter's call stack. Instead, we push/pop that environment on Interpreter::run() enter/exit. Since it should only be used to find the global "this", and not for variable storage (that goes directly into the global object instead!), I had to insert some short-circuiting when walking the environment parent chain during variable lookup. Note that this is a "stepping stone" commit, not a final design.
2020-09-22LibJS: Move the current exception from Interpreter to VMAndreas Kling
This will allow us to throw exceptions even when there is no active interpreter in the VM.
2020-09-21test-web: Keep the Interpreter on the VM interpreter stack during testAndreas Kling
2020-08-28Userland: Stop passing ignored timezones to gettimeofdayNico Weber
2020-08-26LibJS: Add a helper for calling JS::Function's with argumentsAnotherTest
The fact that a `MarkedValueList` had to be created was just annoying, so here's an alternative. This patchset also removes some (now) unneeded MarkedValueList.h includes.
2020-08-23test-web: Add updates from test-jsLuke
These should definitely be deduplicated at some point.
2020-08-23test-js+test-web: Clear taskbar progress on error/assertion failureLuke
Closes #3240
2020-08-17LibWeb: Add more document tests, add comment, text and mixin testsLuke
Also adds a TypeScript definition file for the test runner object.
2020-08-17LibWeb: Rename PageView => InProcessWebViewAndreas Kling
2020-08-15Misc: Use automatic window positioning in more applicationsLinus Groh
This is a follow up to #2936 / d3e3b4ae56aa79d9bde12ca1f143dcf116f89a4c. Affected programs: - Applications: Browser (Download, View source, Inspect DOM tree, JS console), Terminal (Settings) - Demos: Cube, Eyes, Fire, HelloWorld, LibGfxDemo, WebView, WidgetGallery - DevTools: HackStudio, Inspector, Profiler - Games: 2048, Minesweeper, Snake, Solitaire - Userland: test-web A few have been left out where manual positioning is done on purpose, e.g. ClipboardManager (to be close to the menu bar) or VisualBuilder (to preserve alignment of the multiple application windows).
2020-08-14LibJS+LibWeb: Clear exceptions after call'ing JavaScript functionsAndreas Kling
Decorated Interpreter::call() with [[nodiscard]] to provoke thinking about the returned value at each call site. This is definitely not perfect and we should really start thinking about slimming down the public-facing LibJS interpreter API. Fixes #3136.
2020-08-12Test: Mark compilation-unit-only functions as staticBen Wiederhake
This enables a nice warning in case a function becomes dead code. Also, in the case of test-crypto.cpp, I took the liberty to add the prefix 'g_' to the global event loop.
2020-07-28LibWeb: Move the HTML parser into HTML/Parser/Andreas Kling
2020-07-28LibWeb: Move HTML classes into the Web::HTML namespaceAndreas Kling
2020-07-26LibWeb: Move DOM classes into the Web::DOM namespaceAndreas Kling
LibWeb keeps growing and the Web namespace is filling up fast. Let's put DOM stuff into Web::DOM, just like we already started doing with SVG stuff in Web::SVG.
2020-07-25test-web: Add ability to change page mid-testLuke
This allows you to not have to write a separate test file for the same thing but in a different situation. This doesn't handle when you change the page with location.href however. Changes the name of the page load handlers to prevent confusion with this.
2020-07-23LibWeb+test-web: Create test-web program, add doctype testLuke
LibWeb currently has no test suite or program. Let's change that :^) test-web is mostly a copy of test-js, but modified for LibWeb. test-web imports both LibJS/Tests/test-common.js and LibWeb/Test/test-common.js LibWeb's suite provides the ability to specify the page to load, what to do before the page is loaded, and what to do after it's loaded. This also provides a test of document.doctype and its close sibling document.compatMode. Currently, this isn't added to Lagom because of CodeGenerators.