| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 3791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3802 EXPECT_TRUE(client.GetWasCalled()); | 3802 EXPECT_TRUE(client.GetWasCalled()); |
| 3803 | 3803 |
| 3804 web_view_helper_.Reset(); // Remove dependency on locally scoped client. | 3804 web_view_helper_.Reset(); // Remove dependency on locally scoped client. |
| 3805 } | 3805 } |
| 3806 | 3806 |
| 3807 TEST_P(WebViewTest, StopLoadingIfJavaScriptURLReturnsNoStringResult) { | 3807 TEST_P(WebViewTest, StopLoadingIfJavaScriptURLReturnsNoStringResult) { |
| 3808 ViewCreatingWebViewClient client; | 3808 ViewCreatingWebViewClient client; |
| 3809 FrameTestHelpers::WebViewHelper main_web_view; | 3809 FrameTestHelpers::WebViewHelper main_web_view; |
| 3810 main_web_view.InitializeAndLoad("about:blank", true, 0, &client); | 3810 main_web_view.InitializeAndLoad("about:blank", true, 0, &client); |
| 3811 | 3811 |
| 3812 WebFrame* frame = main_web_view.WebView()->MainFrame(); | 3812 WebLocalFrame* frame = main_web_view.WebView()->MainFrameImpl(); |
| 3813 v8::HandleScope scope(v8::Isolate::GetCurrent()); | 3813 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
| 3814 v8::Local<v8::Value> v8_value = | 3814 v8::Local<v8::Value> v8_value = |
| 3815 frame->ExecuteScriptAndReturnValue(WebScriptSource( | 3815 frame->ExecuteScriptAndReturnValue(WebScriptSource( |
| 3816 "var win = window.open('javascript:false'); win.document")); | 3816 "var win = window.open('javascript:false'); win.document")); |
| 3817 ASSERT_TRUE(v8_value->IsObject()); | 3817 ASSERT_TRUE(v8_value->IsObject()); |
| 3818 Document* document = | 3818 Document* document = |
| 3819 V8Document::toImplWithTypeCheck(v8::Isolate::GetCurrent(), v8_value); | 3819 V8Document::toImplWithTypeCheck(v8::Isolate::GetCurrent(), v8_value); |
| 3820 ASSERT_TRUE(document); | 3820 ASSERT_TRUE(document); |
| 3821 EXPECT_FALSE(document->GetFrame()->IsLoading()); | 3821 EXPECT_FALSE(document->GetFrame()->IsLoading()); |
| 3822 } | 3822 } |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4338 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); | 4338 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); |
| 4339 if (RuntimeEnabledFeatures::RootLayerScrollingEnabled()) { | 4339 if (RuntimeEnabledFeatures::RootLayerScrollingEnabled()) { |
| 4340 EXPECT_NE(nullptr, | 4340 EXPECT_NE(nullptr, |
| 4341 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); | 4341 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); |
| 4342 } else { | 4342 } else { |
| 4343 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); | 4343 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); |
| 4344 } | 4344 } |
| 4345 } | 4345 } |
| 4346 | 4346 |
| 4347 } // namespace blink | 4347 } // namespace blink |
| OLD | NEW |