summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 01:22:21 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 01:22:21 +0000
commitdd52aa7f2a374e666b05e7e70029e5a8727e3146 (patch)
tree340853b7534363fae2e0cfa9cf23461f1193426f
parent4b8c41f4f8a8aeb7de84a20454bcfa07dd8f9ade (diff)
downloadchromium_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.cc6
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