| 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);
|
|
|