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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/shim/main.js

Issue 851813002: Fixed and reenabled the flaky test "WebViewAPITest.TestAutosizeAfterNavigation". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/web_view/shim/main.js
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
index 97dcc1a36fb0f0c71974879c26d534250119a7b4..91e7db85636620f7ad061c917fabad2c72d614f3 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
@@ -178,8 +178,9 @@ function testAutosizeBeforeNavigation() {
webview.setAttribute('maxheight', 110);
webview.addEventListener('sizechanged', function(e) {
- embedder.test.assertEq(0, e.oldWidth);
- embedder.test.assertEq(0, e.oldHeight);
+ // The old size should be the default size of the webview, which at the time
+ // of writing this comment is 300 x 300, but is not important to this test
+ // and could change in the future, so it is not checked here.
embedder.test.assertTrue(e.newWidth >= 200 && e.newWidth <= 210);
embedder.test.assertTrue(e.newHeight >= 100 && e.newHeight <= 110);
embedder.test.succeed();
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698