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

Unified Diff: chrome/test/render_view_test.cc

Issue 4078003: Refactoring select popup on Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/render_view_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/render_view_test.cc
===================================================================
--- chrome/test/render_view_test.cc (revision 63740)
+++ chrome/test/render_view_test.cc (working copy)
@@ -61,6 +61,20 @@
GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js)));
}
+bool RenderViewTest::ExecuteJavaScriptAndReturnIntValue(
+ const string16& script,
+ int* int_result) {
+ v8::Handle<v8::Value> result =
+ GetMainFrame()->executeScriptAndReturnValue(WebScriptSource(script));
+ if (result.IsEmpty() || !result->IsInt32())
+ return false;
+
+ if (int_result)
+ *int_result = result->Int32Value();
+
+ return true;
+}
+
void RenderViewTest::LoadHTML(const char* html) {
std::string url_str = "data:text/html;charset=utf-8,";
url_str.append(html);
« no previous file with comments | « chrome/test/render_view_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698