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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 std::unique_ptr<DragImage> NodeImageTestSetup( | 283 std::unique_ptr<DragImage> NodeImageTestSetup( |
284 FrameTestHelpers::WebViewHelper* web_view_helper, | 284 FrameTestHelpers::WebViewHelper* web_view_helper, |
285 const std::string& testcase) { | 285 const std::string& testcase) { |
286 RegisterMockedHttpURLLoad("nodeimage.html"); | 286 RegisterMockedHttpURLLoad("nodeimage.html"); |
287 web_view_helper->InitializeAndLoad(base_url_ + "nodeimage.html"); | 287 web_view_helper->InitializeAndLoad(base_url_ + "nodeimage.html"); |
288 web_view_helper->Resize(WebSize(640, 480)); | 288 web_view_helper->Resize(WebSize(640, 480)); |
289 LocalFrame* frame = | 289 LocalFrame* frame = |
290 ToLocalFrame(web_view_helper->WebView()->GetPage()->MainFrame()); | 290 ToLocalFrame(web_view_helper->WebView()->GetPage()->MainFrame()); |
291 DCHECK(frame); | 291 DCHECK(frame); |
292 Element* element = frame->GetDocument()->getElementById(testcase.c_str()); | 292 Element* element = frame->GetDocument()->getElementById(testcase.c_str()); |
293 return frame->NodeImage(*element); | 293 return DataTransfer::NodeImage(*frame, *element); |
294 } | 294 } |
295 | 295 |
296 void RemoveElementById(WebLocalFrameBase* frame, const AtomicString& id) { | 296 void RemoveElementById(WebLocalFrameBase* frame, const AtomicString& id) { |
297 Element* element = frame->GetFrame()->GetDocument()->getElementById(id); | 297 Element* element = frame->GetFrame()->GetDocument()->getElementById(id); |
298 DCHECK(element); | 298 DCHECK(element); |
299 element->remove(); | 299 element->remove(); |
300 } | 300 } |
301 | 301 |
302 // Both sets the inner html and runs the document lifecycle. | 302 // Both sets the inner html and runs the document lifecycle. |
303 void InitializeWithHTML(LocalFrame& frame, const String& html_content) { | 303 void InitializeWithHTML(LocalFrame& frame, const String& html_content) { |
(...skipping 11972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12276 if (obj->IsText()) { | 12276 if (obj->IsText()) { |
12277 LayoutText* layout_text = ToLayoutText(obj); | 12277 LayoutText* layout_text = ToLayoutText(obj); |
12278 text = layout_text->GetText(); | 12278 text = layout_text->GetText(); |
12279 break; | 12279 break; |
12280 } | 12280 } |
12281 } | 12281 } |
12282 EXPECT_EQ("foo alt", text.Utf8()); | 12282 EXPECT_EQ("foo alt", text.Utf8()); |
12283 } | 12283 } |
12284 | 12284 |
12285 } // namespace blink | 12285 } // namespace blink |
OLD | NEW |