Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2011-04-20 Dominic Cooney <dominicc@chromium.org>
Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Exercise the new layoutTestController methods. * fast/dom/shadow/layout-tests-can-access-shadow-expected.txt: Added. * fast/dom/shadow/layout-tests-can-access-shadow.html: Added. 2011-04-20 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Test: fast/dom/shadow/layout-tests-can-access-shadow.html * WebCore.exp.in: Mac DRT needs to see Element::ensure/removeShadowRoot 2011-04-20 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Chromium DRT relies on the Chromium WebKit API * public/WebElement.h: * src/WebElement.cpp: (WebKit::WebElement::shadowRoot): don't steal a zero refcount (WebKit::WebElement::ensureShadowRoot): added (WebKit::WebElement::removeShadowRoot): added 2011-04-20 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Support for new methods in GTK DRT. * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: (DumpRenderTreeSupportGtk::ensureShadowRoot): (DumpRenderTreeSupportGtk::removeShadowRoot): * WebCoreSupport/DumpRenderTreeSupportGtk.h: 2011-04-20 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Support for new methods in Mac DRT. * DOM/WebDOMOperations.mm: (-[DOMElement _ensureShadowRoot:]): (-[DOMElement _removeShadowRoot]): * DOM/WebDOMOperationsPrivate.h: 2011-04-20 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Support for new methods in Qt DRT. * WebCoreSupport/DumpRenderTreeSupportQt.cpp: (DumpRenderTreeSupportQt::ensureShadowRoot): (DumpRenderTreeSupportQt::removeShadowRoot): * WebCoreSupport/DumpRenderTreeSupportQt.h: 2011-04-20 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Support for new methods in WK2 WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: (WKBundleNodeHandleCopyElementEnsureShadowRoot): (WKBundleNodeHandleRemoveShadowRoot): * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::elementShadowRoot): (WebKit::InjectedBundleNodeHandle::elementEnsureShadowRoot): (WebKit::InjectedBundleNodeHandle::elementRemoveShadowRoot): * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: 2011-04-20 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. layoutTestController can create and destroy shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59058 Chromium, Mac, GTK and Qt DRT; and WK2 test runner. * DumpRenderTree/LayoutTestController.cpp: (ensureShadowRootCallback): (removeShadowRootCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::ensureShadowRoot): (LayoutTestController::removeShadowRoot): * DumpRenderTree/chromium/LayoutTestController.h: * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::ensureShadowRoot): (LayoutTestController::removeShadowRoot): * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::shadowRoot): (LayoutTestController::ensureShadowRoot): (LayoutTestController::removeShadowRoot): * DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::ensureShadowRoot): (LayoutTestController::removeShadowRoot): * DumpRenderTree/qt/LayoutTestControllerQt.h: * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::ensureShadowRoot): (LayoutTestController::removeShadowRoot): * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::shadowRoot): (WTR::LayoutTestController::ensureShadowRoot): (WTR::LayoutTestController::removeShadowRoot): * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Canonical link: https://commits.webkit.org/74211@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
0523785
commit f9b01f7acf81fc3c23c17e3a37485d85047988c3
Showing
35 changed files
with
449 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,13 @@ | ||
|
||
This tests that LayoutTestController can access shadow DOM. | ||
|
||
PASS shadow.nodeName is "#shadow-root" | ||
PASS layoutTestController.shadowRoot(shadow) is null | ||
PASS layoutTestController.shadowRoot(p) is null | ||
PASS shadow.nodeName is "#shadow-root" | ||
PASS shadow === layoutTestController.shadowRoot(p) is true | ||
PASS layoutTestController.shadowRoot(keygen) is null | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../../js/resources/js-test-pre.js"></script> | ||
</head> | ||
<body> | ||
<keygen id="keys" /> | ||
<p id="peas" /> | ||
<pre id="console"> | ||
This tests that LayoutTestController can access shadow DOM. | ||
|
||
</pre> | ||
<script> | ||
if (window.layoutTestController) { | ||
// Make assertions about a built-in shadow | ||
var keygen = document.getElementById('keys'); | ||
var shadow = layoutTestController.shadowRoot(keygen); | ||
shouldBe('shadow.nodeName', '"#shadow-root"'); | ||
|
||
// Shadow roots should not have shadows | ||
shouldBe('layoutTestController.shadowRoot(shadow)', 'null'); | ||
|
||
// Ordinary element should not have shadow | ||
var p = document.getElementById('peas'); | ||
shouldBe('layoutTestController.shadowRoot(p)', 'null'); | ||
|
||
// LayoutTestController can bless ordinary elements with shadows | ||
shadow = layoutTestController.ensureShadowRoot(p); | ||
shouldBe('shadow.nodeName', '"#shadow-root"'); | ||
shouldBe('shadow === layoutTestController.shadowRoot(p)', 'true'); | ||
|
||
// LayoutTestController can strip elements of shadows | ||
layoutTestController.removeShadowRoot(keygen); | ||
shouldBe('layoutTestController.shadowRoot(keygen)', 'null'); | ||
} | ||
|
||
var successfullyParsed = true; | ||
</script> | ||
<script src="../../js/resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.