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

Unified Diff: chrome/browser/apps/web_view_browsertest.cc

Issue 23691039: Reland attempt 2: Improve <webview> autosize: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Relax checking width/height since bunch of removeAttribute() and style.width assignments are not at… Created 7 years, 3 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 | chrome/renderer/resources/extensions/web_view.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/web_view_browsertest.cc
diff --git a/chrome/browser/apps/web_view_browsertest.cc b/chrome/browser/apps/web_view_browsertest.cc
index c28bdf8d0345c588a6e21e15a6e8cee0dc923295..4e6a565880baa5c0eb3168916cd3a665934be527 100644
--- a/chrome/browser/apps/web_view_browsertest.cc
+++ b/chrome/browser/apps/web_view_browsertest.cc
@@ -20,6 +20,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/fake_speech_recognition_manager.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -258,6 +259,17 @@ class WebViewTest : public extensions::PlatformAppBrowserTest {
}
}
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ const testing::TestInfo* const test_info =
+ testing::UnitTest::GetInstance()->current_test_info();
+
+ // Force SW rendering to check autosize bug.
+ if (!strncmp(test_info->name(), "AutoSizeSW", strlen("AutosizeSW")))
+ command_line->AppendSwitch(switches::kDisableForceCompositingMode);
+
+ extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
+ }
+
// This method is responsible for initializing a packaged app, which contains
// multiple webview tags. The tags have different partition identifiers and
// their WebContent objects are returned as output. The method also verifies
@@ -567,6 +579,20 @@ IN_PROC_BROWSER_TEST_F(WebViewTest,
<< message_;
}
+IN_PROC_BROWSER_TEST_F(WebViewTest, AutoSize) {
+ ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize"))
+ << message_;
+}
+
+#if !defined(OS_CHROMEOS)
+// This test ensures <webview> doesn't crash in SW rendering when autosize is
+// turned on.
+IN_PROC_BROWSER_TEST_F(WebViewTest, AutoSizeSW) {
+ ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize"))
+ << message_;
+}
+#endif
+
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeAfterNavigation) {
TestHelper("testAutosizeAfterNavigation",
"DoneShimTest.PASSED",
@@ -587,9 +613,8 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeRemoveAttributes) {
"web_view/shim");
}
-// This test is flaky. crbug.com/282116
IN_PROC_BROWSER_TEST_F(WebViewTest,
- DISABLED_Shim_TestAutosizeWithPartialAttributes) {
+ Shim_TestAutosizeWithPartialAttributes) {
TestHelper("testAutosizeWithPartialAttributes",
"DoneShimTest.PASSED",
"DoneShimTest.FAILED",
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/web_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698