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

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

Issue 2923433002: Move ExecuteScript method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Tweaked a comment in WebViewPlugin::WebViewHelper::main_frame [as suggested in CR feedback] 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 Node* item = NodeTraversal::ChildAt(Console(), 1 + i); 204 Node* item = NodeTraversal::ChildAt(Console(), 1 + i);
205 205
206 DCHECK(item); 206 DCHECK(item);
207 DCHECK(isHTMLLIElement(item)); 207 DCHECK(isHTMLLIElement(item));
208 DCHECK(item->hasChildren()); 208 DCHECK(item->hasChildren());
209 209
210 return item->textContent(); 210 return item->textContent();
211 } 211 }
212 212
213 void ExecuteScript(const char* code) { 213 void ExecuteScript(const char* code) {
214 web_view_helper_.WebView()->MainFrame()->ExecuteScript( 214 web_view_helper_.WebView()->MainFrameImpl()->ExecuteScript(
215 WebScriptSource(WebString::FromUTF8(code))); 215 WebScriptSource(WebString::FromUTF8(code)));
216 } 216 }
217 217
218 TestPrerenderingSupport* PrerenderingSupport() { 218 TestPrerenderingSupport* PrerenderingSupport() {
219 return &prerendering_support_; 219 return &prerendering_support_;
220 } 220 }
221 221
222 TestPrerendererClient* PrerendererClient() { return &prerenderer_client_; } 222 TestPrerendererClient* PrerendererClient() { return &prerenderer_client_; }
223 223
224 private: 224 private:
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 WebPrerender rel_next_and_prerender = 469 WebPrerender rel_next_and_prerender =
470 PrerendererClient()->ReleaseWebPrerender(); 470 PrerendererClient()->ReleaseWebPrerender();
471 EXPECT_EQ(ToWebURL("http://rel-next-and-prerender.com/"), 471 EXPECT_EQ(ToWebURL("http://rel-next-and-prerender.com/"),
472 rel_next_and_prerender.Url()); 472 rel_next_and_prerender.Url());
473 EXPECT_EQ( 473 EXPECT_EQ(
474 static_cast<unsigned>(kPrerenderRelTypeNext | kPrerenderRelTypePrerender), 474 static_cast<unsigned>(kPrerenderRelTypeNext | kPrerenderRelTypePrerender),
475 rel_next_and_prerender.RelTypes()); 475 rel_next_and_prerender.RelTypes());
476 } 476 }
477 477
478 } // namespace blink 478 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp ('k') | third_party/WebKit/Source/web/tests/ViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698