Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
index 0858041c758bf12c970050eb39cb9deffc831340..8a0dd3904c1786485c15a6b69eb71d36dade19ba 100644 |
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
@@ -402,14 +402,15 @@ TEST_P(ParameterizedWebFrameTest, FrameForEnteredContext) { |
web_view_helper.InitializeAndLoad(base_url_ + "iframes_test.html", true); |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
- EXPECT_EQ( |
- web_view_helper.WebView()->MainFrame(), |
- WebLocalFrame::FrameForContext( |
- web_view_helper.WebView()->MainFrame()->MainWorldScriptContext())); |
+ EXPECT_EQ(web_view_helper.WebView()->MainFrame(), |
+ WebLocalFrame::FrameForContext(web_view_helper.WebView() |
+ ->MainFrameImpl() |
+ ->MainWorldScriptContext())); |
EXPECT_EQ(web_view_helper.WebView()->MainFrame()->FirstChild(), |
WebLocalFrame::FrameForContext(web_view_helper.WebView() |
->MainFrame() |
->FirstChild() |
+ ->ToWebLocalFrame() |
->MainWorldScriptContext())); |
} |
@@ -450,7 +451,7 @@ TEST_P(ParameterizedWebFrameTest, RequestExecuteScript) { |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
ScriptExecutionCallbackHelper callback_helper( |
- web_view_helper.WebView()->MainFrame()->MainWorldScriptContext()); |
+ web_view_helper.WebView()->MainFrameImpl()->MainWorldScriptContext()); |
web_view_helper.WebView() |
->MainFrameImpl() |
->RequestExecuteScriptAndReturnValue( |
@@ -469,7 +470,7 @@ TEST_P(ParameterizedWebFrameTest, SuspendedRequestExecuteScript) { |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
ScriptExecutionCallbackHelper callback_helper( |
- web_view_helper.WebView()->MainFrame()->MainWorldScriptContext()); |
+ web_view_helper.WebView()->MainFrameImpl()->MainWorldScriptContext()); |
// Suspend scheduled tasks so the script doesn't run. |
web_view_helper.WebView() |
@@ -504,7 +505,7 @@ TEST_P(ParameterizedWebFrameTest, RequestExecuteV8Function) { |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
v8::Local<v8::Context> context = |
- web_view_helper.WebView()->MainFrame()->MainWorldScriptContext(); |
+ web_view_helper.WebView()->MainFrameImpl()->MainWorldScriptContext(); |
ScriptExecutionCallbackHelper callback_helper(context); |
v8::Local<v8::Function> function = |
v8::Function::New(context, callback).ToLocalChecked(); |
@@ -531,7 +532,7 @@ TEST_P(ParameterizedWebFrameTest, RequestExecuteV8FunctionWhileSuspended) { |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
v8::Local<v8::Context> context = |
- web_view_helper.WebView()->MainFrame()->MainWorldScriptContext(); |
+ web_view_helper.WebView()->MainFrameImpl()->MainWorldScriptContext(); |
// Suspend scheduled tasks so the script doesn't run. |
WebLocalFrameBase* main_frame = web_view_helper.WebView()->MainFrameImpl(); |
@@ -571,7 +572,7 @@ TEST_P(ParameterizedWebFrameTest, |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
v8::Local<v8::Context> context = |
- web_view_helper.WebView()->MainFrame()->MainWorldScriptContext(); |
+ web_view_helper.WebView()->MainFrameImpl()->MainWorldScriptContext(); |
std::unique_ptr<UserGestureIndicator> indicator = |
WTF::WrapUnique(new UserGestureIndicator( |
@@ -601,7 +602,7 @@ TEST_P(ParameterizedWebFrameTest, IframeScriptRemovesSelf) { |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
ScriptExecutionCallbackHelper callback_helper( |
- web_view_helper.WebView()->MainFrame()->MainWorldScriptContext()); |
+ web_view_helper.WebView()->MainFrameImpl()->MainWorldScriptContext()); |
web_view_helper.WebView() |
->MainFrame() |
->FirstChild() |
@@ -4571,7 +4572,7 @@ TEST_P(ParameterizedWebFrameTest, ContextNotificationsLoadUnload) { |
web_view_helper.InitializeAndLoad( |
base_url_ + "context_notifications_test.html", true, &web_frame_client); |
- WebFrame* main_frame = web_view_helper.WebView()->MainFrame(); |
+ WebLocalFrameBase* main_frame = web_view_helper.WebView()->MainFrameImpl(); |
WebFrame* child_frame = main_frame->FirstChild(); |
ASSERT_EQ(2u, create_notifications.size()); |
@@ -4586,7 +4587,7 @@ TEST_P(ParameterizedWebFrameTest, ContextNotificationsLoadUnload) { |
EXPECT_EQ(0, first_create_notification->world_id); |
EXPECT_EQ(child_frame, second_create_notification->frame); |
- EXPECT_EQ(child_frame->MainWorldScriptContext(), |
+ EXPECT_EQ(child_frame->ToWebLocalFrame()->MainWorldScriptContext(), |
second_create_notification->context); |
EXPECT_EQ(0, second_create_notification->world_id); |
@@ -4635,7 +4636,7 @@ TEST_P(ParameterizedWebFrameTest, ContextNotificationsReload) { |
// The last two create notifications should be for the current frames and |
// context. |
- WebFrame* main_frame = web_view_helper.WebView()->MainFrame(); |
+ WebLocalFrameBase* main_frame = web_view_helper.WebView()->MainFrameImpl(); |
WebFrame* child_frame = main_frame->FirstChild(); |
auto& first_refresh_notification = create_notifications[2]; |
auto& second_refresh_notification = create_notifications[3]; |
@@ -4646,7 +4647,7 @@ TEST_P(ParameterizedWebFrameTest, ContextNotificationsReload) { |
EXPECT_EQ(0, first_refresh_notification->world_id); |
EXPECT_EQ(child_frame, second_refresh_notification->frame); |
- EXPECT_EQ(child_frame->MainWorldScriptContext(), |
+ EXPECT_EQ(child_frame->ToWebLocalFrame()->MainWorldScriptContext(), |
second_refresh_notification->context); |
EXPECT_EQ(0, second_refresh_notification->world_id); |
} |
@@ -4685,8 +4686,9 @@ TEST_P(ParameterizedWebFrameTest, ContextNotificationsIsolatedWorlds) { |
// We don't have an API to enumarate isolated worlds for a frame, but we can |
// at least assert that the context we got is *not* the main world's context. |
- ASSERT_NE(web_view_helper.WebView()->MainFrame()->MainWorldScriptContext(), |
- v8::Local<v8::Context>::New(isolate, notification->context)); |
+ ASSERT_NE( |
+ web_view_helper.WebView()->MainFrameImpl()->MainWorldScriptContext(), |
+ v8::Local<v8::Context>::New(isolate, notification->context)); |
web_view_helper.Reset(); |
@@ -9939,7 +9941,7 @@ class DeviceEmulationTest : public ParameterizedWebFrameTest { |
String code = "dumpSize('" + id + "')"; |
v8::HandleScope scope(v8::Isolate::GetCurrent()); |
ScriptExecutionCallbackHelper callback_helper( |
- web_view_helper_.WebView()->MainFrame()->MainWorldScriptContext()); |
+ web_view_helper_.WebView()->MainFrameImpl()->MainWorldScriptContext()); |
web_view_helper_.WebView() |
->MainFrameImpl() |
->RequestExecuteScriptAndReturnValue(WebScriptSource(WebString(code)), |