Chromium Code Reviews| Index: third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp |
| diff --git a/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp b/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp |
| index de6d7918fc3d9527043b77253d598947ef73d23c..dc44385354b0f1284ffb9dea4e3e01098cc4d172 100644 |
| --- a/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp |
| +++ b/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp |
| @@ -66,11 +66,14 @@ class LayoutGeometryMapTest |
| static LayoutBox* GetFrameElement(const char* iframe_name, |
| WebView* web_view, |
| const WTF::AtomicString& element_id) { |
| - WebLocalFrameImpl* iframe = ToWebLocalFrameImpl( |
| - web_view->FindFrameByName(WebString::FromUTF8(iframe_name))); |
| - if (!iframe) |
| + if (!web_view->MainFrame()->IsWebLocalFrame()) |
|
dcheng
2017/05/26 18:28:05
As this is a unit test, you can cheat and just use
Łukasz Anforowicz
2017/05/26 20:04:05
Done (I think, I hope I've correctly understood wh
dcheng
2017/05/26 20:16:19
Ah.... the problem is this test isn't plumbing thi
|
| return nullptr; |
| - LocalFrame* frame = iframe->GetFrame(); |
| + WebFrame* iframe = |
| + web_view->MainFrame()->ToWebLocalFrame()->FindFrameByName( |
| + WebString::FromUTF8(iframe_name)); |
| + if (!iframe || !iframe->IsWebLocalFrame()) |
| + return nullptr; |
| + LocalFrame* frame = ToWebLocalFrameImpl(iframe)->GetFrame(); |
| Document* doc = frame->GetDocument(); |
| Element* element = doc->getElementById(element_id); |
| if (!element) |