| Index: third_party/WebKit/Source/core/page/FocusControllerTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/FocusControllerTest.cpp b/third_party/WebKit/Source/core/page/FocusControllerTest.cpp
|
| index 1f648b937c78d2f305df048dfa5559ed44f6c446..767d70cb086779edbfbcd7a964639527229b6f64 100644
|
| --- a/third_party/WebKit/Source/core/page/FocusControllerTest.cpp
|
| +++ b/third_party/WebKit/Source/core/page/FocusControllerTest.cpp
|
| @@ -94,4 +94,30 @@ TEST_F(FocusControllerTest, SetActiveOnInactiveDocument) {
|
| PageHolder()->GetPage().GetFocusController().SetActive(true);
|
| }
|
|
|
| +// This test is for crbug.com/733218
|
| +TEST_F(FocusControllerTest, SVGFocusableElementInForm) {
|
| + GetDocument().body()->setInnerHTML(
|
| + "<form>"
|
| + "<input id='first'>"
|
| + "<svg width='100px' height='100px' tabindex='0'>"
|
| + "<circle cx='50' cy='50' r='30' />"
|
| + "</svg>"
|
| + "<input id='last'>"
|
| + "</form>");
|
| +
|
| + Element* form = ToElement(GetDocument().body()->firstChild());
|
| + Element* first = ToElement(form->firstChild());
|
| + Element* last = ToElement(form->lastChild());
|
| +
|
| + Element* next = GetFocusController().NextFocusableElementInForm(
|
| + first, kWebFocusTypeForward);
|
| + EXPECT_EQ(next, last)
|
| + << "SVG Element should be skipped even when focusable in form.";
|
| +
|
| + Element* prev = GetFocusController().NextFocusableElementInForm(
|
| + next, kWebFocusTypeBackward);
|
| + EXPECT_EQ(prev, first)
|
| + << "SVG Element should be skipped even when focusable in form.";
|
| +}
|
| +
|
| } // namespace blink
|
|
|