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

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

Issue 2934233002: In-place modification of drag related functionality present in 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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