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