Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2940583002: Move drag related functionality out of LocalFrame (Closed)
Patch Set: updatedPS Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/page/DragControllerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/DragControllerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698