Changes between Version 22 and Version 23 of Writing Layout Tests for DumpRenderTree


Ignore:
Timestamp:
Jun 25, 2011 8:15:42 AM (9 years ago)
Author:
dominicc@chromium.org
Comment:

Documents window.internals.

Legend:

Unmodified
Added
Removed
Modified
  • Writing Layout Tests for DumpRenderTree

    v22 v23  
    126126To test a bug having to do with the loader or the back/forward cache, call this method to run a script after executing a back/forward navigation. The first argument is the script to run, and the second argument is the page to load during the navigation. The second argument is optional. It defaults to `about:blank`.
    127127
     128== `window.internals` ==
     129
     130=== `createShadowContentElement(Document)` ===
     131
     132Creates a `<content>` element for use in shadow DOM. These elements can not be created from JavaScript, hence this constructor in the test harness.
     133
     134=== `elementRenderTreeAsText(Element)` ===
     135
     136Gets and returns the element’s renderer’s description of its tree as a String.
     137
     138=== `ensureShadowRoot(Element)` ===
     139
     140Given a host element, returns its shadow root node. If the element doesn’t have a shadow root one is created and attached to the element. If you want to just retrieve a shadow root without creating one, use ''shadowRoot''. ''ensureShadowRoot'' only inspects DOM shadows; not SVG shadows.
     141
     142=== `isPreloaded(Document, String url)` ===
     143
     144Gets whether the specified document’s cached resource loader has the specified URL preloaded.
     145
     146=== `removeShadowRoot(Element)` ===
     147
     148Given a host element, removes its shadow root if it has one. ''removeShadowRoot'' only inspects DOM shadows; not SVG shadows.
     149
     150=== `shadowPseudoId(Element)` ===
     151
     152Gets the specified element’s CSS pseudo-id for styling when in shadow DOM.
     153
     154=== `shadowRoot(Element)` ===
     155
     156Given a host element gets its shadow root, if it has one; otherwise ''shadowRoot'' returns `null`.
     157
    128158= Writing tests which require network access =
    129159