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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 1585793002: Update lifecycle phases when a WebView is resized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 4692 matching lines...) Expand 10 before | Expand all | Expand 10 after
4703 CompositedSelectionBoundsTestWebViewClient fakeSelectionWebViewClient; 4703 CompositedSelectionBoundsTestWebViewClient fakeSelectionWebViewClient;
4704 CompositedSelectionBoundsTestLayerTreeView& fakeSelectionLayerTreeView = fak eSelectionWebViewClient.selectionLayerTreeView(); 4704 CompositedSelectionBoundsTestLayerTreeView& fakeSelectionLayerTreeView = fak eSelectionWebViewClient.selectionLayerTreeView();
4705 4705
4706 FrameTestHelpers::WebViewHelper webViewHelper(this); 4706 FrameTestHelpers::WebViewHelper webViewHelper(this);
4707 webViewHelper.initialize(true, 0, &fakeSelectionWebViewClient); 4707 webViewHelper.initialize(true, 0, &fakeSelectionWebViewClient);
4708 webViewHelper.webView()->settings()->setDefaultFontSize(12); 4708 webViewHelper.webView()->settings()->setDefaultFontSize(12);
4709 webViewHelper.webView()->setDefaultPageScaleLimits(1, 1); 4709 webViewHelper.webView()->setDefaultPageScaleLimits(1, 1);
4710 webViewHelper.webView()->resize(WebSize(viewWidth, viewHeight)); 4710 webViewHelper.webView()->resize(WebSize(viewWidth, viewHeight));
4711 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL + "select_range_basic.html"); 4711 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL + "select_range_basic.html");
4712 4712
4713 // The frame starts with a non-empty selection. 4713 // The frame starts with no selection.
4714 WebFrame* frame = webViewHelper.webView()->mainFrame(); 4714 WebFrame* frame = webViewHelper.webView()->mainFrame();
4715 ASSERT_TRUE(frame->hasSelection()); 4715 ASSERT_TRUE(frame->hasSelection());
4716 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); 4716 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
chrishtr 2016/01/15 02:17:13 This change is because we are now pumping the whol
4717 4717
4718 // The selection cleared notification should be triggered upon layout. 4718 // The selection cleared notification should be triggered upon layout.
4719 frame->executeCommand(WebString::fromUTF8("Unselect")); 4719 frame->executeCommand(WebString::fromUTF8("Unselect"));
4720 ASSERT_FALSE(frame->hasSelection()); 4720 ASSERT_FALSE(frame->hasSelection());
4721 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); 4721 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
4722 webViewHelper.webView()->updateAllLifecyclePhases(); 4722 webViewHelper.webView()->updateAllLifecyclePhases();
4723 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); 4723 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared());
4724 4724
4725 frame->executeCommand(WebString::fromUTF8("SelectAll")); 4725 frame->executeCommand(WebString::fromUTF8("SelectAll"));
4726 webViewHelper.webView()->updateAllLifecyclePhases(); 4726 webViewHelper.webView()->updateAllLifecyclePhases();
(...skipping 3720 matching lines...) Expand 10 before | Expand all | Expand 10 after
8447 } 8447 }
8448 8448
8449 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) 8449 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange)
8450 { 8450 {
8451 swapLocalFrameToRemoteFrame(); 8451 swapLocalFrameToRemoteFrame();
8452 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';")); 8452 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';"));
8453 EXPECT_FALSE(remoteFrameClient()->isVisible()); 8453 EXPECT_FALSE(remoteFrameClient()->isVisible());
8454 } 8454 }
8455 8455
8456 } // namespace blink 8456 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698