OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 std::unique_ptr<DragImage> NodeImageTestSetup( | 288 std::unique_ptr<DragImage> NodeImageTestSetup( |
289 FrameTestHelpers::WebViewHelper* web_view_helper, | 289 FrameTestHelpers::WebViewHelper* web_view_helper, |
290 const std::string& testcase) { | 290 const std::string& testcase) { |
291 RegisterMockedHttpURLLoad("nodeimage.html"); | 291 RegisterMockedHttpURLLoad("nodeimage.html"); |
292 web_view_helper->InitializeAndLoad(base_url_ + "nodeimage.html"); | 292 web_view_helper->InitializeAndLoad(base_url_ + "nodeimage.html"); |
293 web_view_helper->Resize(WebSize(640, 480)); | 293 web_view_helper->Resize(WebSize(640, 480)); |
294 LocalFrame* frame = | 294 LocalFrame* frame = |
295 ToLocalFrame(web_view_helper->WebView()->GetPage()->MainFrame()); | 295 ToLocalFrame(web_view_helper->WebView()->GetPage()->MainFrame()); |
296 DCHECK(frame); | 296 DCHECK(frame); |
297 Element* element = frame->GetDocument()->getElementById(testcase.c_str()); | 297 Element* element = frame->GetDocument()->getElementById(testcase.c_str()); |
298 return frame->NodeImage(*element); | 298 return DataTransfer::NodeImage(*frame, *element); |
299 } | 299 } |
300 | 300 |
301 void RemoveElementById(WebLocalFrameBase* frame, const AtomicString& id) { | 301 void RemoveElementById(WebLocalFrameBase* frame, const AtomicString& id) { |
302 Element* element = frame->GetFrame()->GetDocument()->getElementById(id); | 302 Element* element = frame->GetFrame()->GetDocument()->getElementById(id); |
303 DCHECK(element); | 303 DCHECK(element); |
304 element->remove(); | 304 element->remove(); |
305 } | 305 } |
306 | 306 |
307 // Both sets the inner html and runs the document lifecycle. | 307 // Both sets the inner html and runs the document lifecycle. |
308 void InitializeWithHTML(LocalFrame& frame, const String& html_content) { | 308 void InitializeWithHTML(LocalFrame& frame, const String& html_content) { |
(...skipping 11932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12241 if (obj->IsText()) { | 12241 if (obj->IsText()) { |
12242 LayoutText* layout_text = ToLayoutText(obj); | 12242 LayoutText* layout_text = ToLayoutText(obj); |
12243 text = layout_text->GetText(); | 12243 text = layout_text->GetText(); |
12244 break; | 12244 break; |
12245 } | 12245 } |
12246 } | 12246 } |
12247 EXPECT_EQ("foo alt", text.Utf8()); | 12247 EXPECT_EQ("foo alt", text.Utf8()); |
12248 } | 12248 } |
12249 | 12249 |
12250 } // namespace blink | 12250 } // namespace blink |
OLD | NEW |