Commit 815551bc authored by dglazkov@chromium.org's avatar dglazkov@chromium.org

2011-04-08 Dominic Cooney <dominicc@google.com>

        Reviewed by Adam Roben.

        layoutTestController.shadowRoot returns null, not undefined, when
        its argument is invalid.
        https://bugs.webkit.org/show_bug.cgi?id=58121

        Update the test to expect null and not undefined.

        * fast/dom/HTMLKeygenElement/keygen-expected.txt:
        * fast/dom/HTMLKeygenElement/keygen.html:
        * platform/chromium/test_expectations.txt: unskip keygen.html
2011-04-08  Dominic Cooney  <dominicc@google.com>

        Reviewed by Adam Roben.

        Make layoutTestController.shadowRoot return null, not undefined,
        when its argument is invalid.
        https://bugs.webkit.org/show_bug.cgi?id=58121

        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
        (DumpRenderTreeSupportGtk::shadowRoot):
2011-04-08  Dominic Cooney  <dominicc@google.com>

        Reviewed by Adam Roben.

        Make layoutTestController.shadowRoot return null, not undefined,
        when its argument is invalid.
        https://bugs.webkit.org/show_bug.cgi?id=58121

        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
        (LayoutTestController::shadowRoot):
        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        (WTR::LayoutTestController::shadowRoot):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 14984d17
2011-04-08 Dominic Cooney <dominicc@google.com>
Reviewed by Adam Roben.
layoutTestController.shadowRoot returns null, not undefined, when
its argument is invalid.
https://bugs.webkit.org/show_bug.cgi?id=58121
Update the test to expect null and not undefined.
* fast/dom/HTMLKeygenElement/keygen-expected.txt:
* fast/dom/HTMLKeygenElement/keygen.html:
* platform/chromium/test_expectations.txt: unskip keygen.html
2011-04-08 Ryosuke Niwa <rniwa@webkit.org>
Chromium rebaselines after r83291.
......@@ -3,7 +3,7 @@ This tests the keygen element.
PASS keygen.options is undefined
PASS shadow.firstChild.tagName is "SELECT"
PASS layoutTestController.shadowRoot(shadow) is undefined
PASS layoutTestController.shadowRoot(shadow) is null
PASS layoutTestController.shadowRoot(shadow.firstChild) is null
PASS successfullyParsed is true
......
......@@ -16,7 +16,7 @@ shouldBe('keygen.options', 'undefined'); // keygen is not a select
if (window.layoutTestController) {
var shadow = layoutTestController.shadowRoot(keygen);
shouldBe('shadow.firstChild.tagName', '"SELECT"');
shouldBe('layoutTestController.shadowRoot(shadow)', 'undefined');
shouldBe('layoutTestController.shadowRoot(shadow)', 'null');
shouldBe('layoutTestController.shadowRoot(shadow.firstChild)', 'null');
}
......
......@@ -3245,9 +3245,6 @@ BUGCR75992 GPU MAC SNOWLEOPARD : platform/chromium/compositing/huge-layer-rotate
// Chrome doesn't load favicons in DRT tests.
BUGWK57259 : http/tests/misc/link-rel-icon-beforeload.html = FAIL PASS
// Unskip when Chromium DRT layoutTestController implements shadowRoot accessor
BUGWK56573 : fast/dom/HTMLKeygenElement/keygen.html = FAIL
// This test is very flaky on Mac and a little flaky on Win and Linux.
BUGXXX : media/video-delay-load-event.html = PASS TEXT
// This test appears to timeout every 10 or 20 runs.
......
2011-04-08 Dominic Cooney <dominicc@google.com>
Reviewed by Adam Roben.
Make layoutTestController.shadowRoot return null, not undefined,
when its argument is invalid.
https://bugs.webkit.org/show_bug.cgi?id=58121
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::shadowRoot):
2011-04-08 Dominic Cooney <dominicc@google.com>
Reviewed by Kent Tamura.
......
......@@ -643,7 +643,7 @@ JSValueRef DumpRenderTreeSupportGtk::shadowRoot(JSContextRef context, JSValueRef
JSC::ExecState* exec = toJS(context);
Element* element = toElement(toJS(exec, value));
if (!element)
return JSValueMakeUndefined(context);
return JSValueMakeNull(context);
return toRef(exec, toJS(exec, element->shadowRoot()));
}
......
2011-04-08 Dominic Cooney <dominicc@google.com>
Reviewed by Adam Roben.
Make layoutTestController.shadowRoot return null, not undefined,
when its argument is invalid.
https://bugs.webkit.org/show_bug.cgi?id=58121
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::shadowRoot):
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::shadowRoot):
2011-04-08 Dirk Pranke <dpranke@chromium.org>
Reviewed by Tony Chang.
......
......@@ -1072,7 +1072,7 @@ JSValueRef LayoutTestController::shadowRoot(JSContextRef context, JSValueRef jsE
{
DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:jsElement];
if (!element)
return JSValueMakeUndefined(context);
return JSValueMakeNull(context);
return [element _shadowRoot:context];
}
......
......@@ -360,11 +360,11 @@ JSValueRef LayoutTestController::shadowRoot(JSValueRef element)
JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
if (!element || !JSValueIsObject(context, element))
return JSValueMakeUndefined(context);
return JSValueMakeNull(context);
WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element)));
if (!domElement)
return JSValueMakeUndefined(context);
return JSValueMakeNull(context);
WKRetainPtr<WKBundleNodeHandleRef> shadowRootDOMElement = adoptWK(WKBundleNodeHandleCopyElementShadowRoot(domElement.get()));
if (!shadowRootDOMElement)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment