Commit f73b9e48 authored by Ross Mcilroy's avatar Ross Mcilroy Committed by Commit Bot

[cleanup] Avoid using deprecated APIs in render_view_test.

BUG=v8:7786

Change-Id: I2325c003da6db08a72eb442ea4f9641ca62d78ad
Reviewed-on: https://chromium-review.googlesource.com/1159071Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580108}
parent c09f5e83
...@@ -194,7 +194,7 @@ bool RenderViewTest::ExecuteJavaScriptAndReturnIntValue( ...@@ -194,7 +194,7 @@ bool RenderViewTest::ExecuteJavaScriptAndReturnIntValue(
return false; return false;
if (int_result) if (int_result)
*int_result = result->Int32Value(); *int_result = result.As<v8::Int32>()->Value();
return true; return true;
} }
...@@ -209,7 +209,7 @@ bool RenderViewTest::ExecuteJavaScriptAndReturnNumberValue( ...@@ -209,7 +209,7 @@ bool RenderViewTest::ExecuteJavaScriptAndReturnNumberValue(
return false; return false;
if (number_result) if (number_result)
*number_result = result->NumberValue(); *number_result = result.As<v8::Number>()->Value();
return true; return true;
} }
...@@ -488,7 +488,7 @@ gfx::Rect RenderViewTest::GetElementBounds(const std::string& element_id) { ...@@ -488,7 +488,7 @@ gfx::Rect RenderViewTest::GetElementBounds(const std::string& element_id) {
v8::Local<v8::Value> value = array->Get(index); v8::Local<v8::Value> value = array->Get(index);
if (value.IsEmpty() || !value->IsInt32()) if (value.IsEmpty() || !value->IsInt32())
return gfx::Rect(); return gfx::Rect();
coords.push_back(value->Int32Value()); coords.push_back(value.As<v8::Int32>()->Value());
} }
return gfx::Rect(coords[0], coords[1], coords[2], coords[3]); return gfx::Rect(coords[0], coords[1], coords[2], coords[3]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment