diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 01:22:21 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 01:22:21 +0000 |
commit | dd52aa7f2a374e666b05e7e70029e5a8727e3146 (patch) | |
tree | 340853b7534363fae2e0cfa9cf23461f1193426f | |
parent | 4b8c41f4f8a8aeb7de84a20454bcfa07dd8f9ade (diff) | |
download | chromium_src-dd52aa7f2a374e666b05e7e70029e5a8727e3146.zip chromium_src-dd52aa7f2a374e666b05e7e70029e5a8727e3146.tar.gz chromium_src-dd52aa7f2a374e666b05e7e70029e5a8727e3146.tar.bz2 |
Fix mistaken assumptions in tests
This test assumes that spinning the event loop is sufficient to trigger
asynchronous style recalculation. After we move style recalculation to be
triggered off requestAnimationFrame, this assumption will no longer be valid.
This CL removes this assumption by triggering layout explicitly
R=fsamuel@chromium.org
BUG=337617
Review URL: https://codereview.chromium.org/148153013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247563 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/renderer/browser_plugin/browser_plugin_browsertest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc index 36ee92c..0d2ed73 100644 --- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc +++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc @@ -319,11 +319,17 @@ TEST_F(BrowserPluginTest, ResizeFlowControl) { browser_plugin_manager()->sink().ClearMessages(); // Resize the browser plugin three times. + ExecuteJavaScript("document.getElementById('browserplugin').width = '641px'"); + GetMainFrame()->view()->layout(); ProcessPendingMessages(); + ExecuteJavaScript("document.getElementById('browserplugin').width = '642px'"); + GetMainFrame()->view()->layout(); ProcessPendingMessages(); + ExecuteJavaScript("document.getElementById('browserplugin').width = '643px'"); + GetMainFrame()->view()->layout(); ProcessPendingMessages(); // Expect to see one resize messsage in the sink. BrowserPlugin will not issue |