summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Tests
AgeCommit message (Collapse)Author
2020-08-31LibWeb: Implement document ready stateLuke
2020-08-31LibWeb: Expose window.self and window.framesLuke
"self" is a way to refer to the global object that will work in both a window context and a web worker context. "frames" apparently used to return a list of frame objects according to MDN, but it now just returns the window object.
2020-08-30LibWeb: Remove redundant .prettierrcLinus Groh
Now that LibJS's .prettierrc has been moved to the repository root (as we start having .js files in /res), we don't need to keep a second, identical copy for the LibWeb tests.
2020-08-21LibWeb: Implement <template> parsingLuke
Note that there is currently no way to display them as we can't currently clone nodes. Adds special case for templates for dumping to console. Doesn't add it to the DOM inspector as I'm not sure how to do it.
2020-08-18LibWeb: Implement Element.innerTextNico Weber
Reading the property has a few warts (see FIXMEs in the included tests), but with this the timestamps on http://45.33.8.238/ get localized :^) Since the Date() constructor currently ignores all arguments, they don't get localized correctly but are all set to the current time, but hey, it's still progress from a certain point of view.
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: Add Node.textContentNico Weber
This requires moving remove_all_children() from ParentNode to Node, which makes ParentNode.cpp empty, so remove it. It also co-opts the existing Node::text_content() method and tweaks it slightly to fit the semantics of Node.textContent.
2020-08-03LibWeb: Add a very basic test for Text node APIs ("data" and "length")Andreas Kling
2020-08-03LibWeb: Reorganize tests into DOM/ and HTML/Andreas Kling
2020-08-03LibWeb: Add the Document.documentElement APIAndreas Kling
Also change DOM::Document::document_element() to return an Element* and not an HTML::HTMLHtmlElement since that's not the only kind of documentElement we might encounter.
2020-08-03LibWeb: Move contentEditable from Element to HTMLElementLuke
HTMLElement is the only interface that includes ElementContentEditable in the HTML specification. This makes sense, as Element is also a base class for elements in other specifications such as SVG, which definitely shouldn't be editable. Also adds a test for the attribute based on what Andreas did in the video that added it.
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: Add tests for atob() and btoa()Nico Weber
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.