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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc

Issue 2794823002: Disable flaky web_view_interactive_browsertest tests (Closed)
Patch Set: bla Created 3 years, 8 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 | « no previous file | 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 if (GetParam()) 671 if (GetParam())
672 return; 672 return;
673 TestHelper("testFocusBeforeNavigation", "web_view/focus", NO_TEST_SERVER); 673 TestHelper("testFocusBeforeNavigation", "web_view/focus", NO_TEST_SERVER);
674 } 674 }
675 675
676 // Tests that setting focus on the <webview> sets focus on the guest. 676 // Tests that setting focus on the <webview> sets focus on the guest.
677 IN_PROC_BROWSER_TEST_P(WebViewFocusInteractiveTest, Focus_FocusEvent) { 677 IN_PROC_BROWSER_TEST_P(WebViewFocusInteractiveTest, Focus_FocusEvent) {
678 TestHelper("testFocusEvent", "web_view/focus", NO_TEST_SERVER); 678 TestHelper("testFocusEvent", "web_view/focus", NO_TEST_SERVER);
679 } 679 }
680 680
681 IN_PROC_BROWSER_TEST_P(WebViewFocusInteractiveTest, Focus_FocusTracksEmbedder) { 681 // Flaky on Mac and Linux - https://crbug.com/707648
682 #if defined(OS_MACOSX) || defined(OS_LINUX)
683 #define MAYBE_Focus_FocusTracksEmbedder DISABLED_Focus_FocusTracksEmbedder
684 #else
685 #define MAYBE_Focus_FocusTracksEmbedder Focus_FocusTracksEmbedder
686 #endif
687
688 IN_PROC_BROWSER_TEST_P(WebViewFocusInteractiveTest,
689 MAYBE_Focus_FocusTracksEmbedder) {
682 content::WebContents* embedder_web_contents = NULL; 690 content::WebContents* embedder_web_contents = NULL;
683 691
684 std::unique_ptr<ExtensionTestMessageListener> done_listener( 692 std::unique_ptr<ExtensionTestMessageListener> done_listener(
685 RunAppHelper("testFocusTracksEmbedder", "web_view/focus", NO_TEST_SERVER, 693 RunAppHelper("testFocusTracksEmbedder", "web_view/focus", NO_TEST_SERVER,
686 &embedder_web_contents)); 694 &embedder_web_contents));
687 done_listener->WaitUntilSatisfied(); 695 done_listener->WaitUntilSatisfied();
688 696
689 ExtensionTestMessageListener next_step_listener("TEST_STEP_PASSED", false); 697 ExtensionTestMessageListener next_step_listener("TEST_STEP_PASSED", false);
690 next_step_listener.set_failure_message("TEST_STEP_FAILED"); 698 next_step_listener.set_failure_message("TEST_STEP_FAILED");
691 EXPECT_TRUE(content::ExecuteScript( 699 EXPECT_TRUE(content::ExecuteScript(
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 IN_PROC_BROWSER_TEST_F(WebViewPopupInteractiveTest, 1064 IN_PROC_BROWSER_TEST_F(WebViewPopupInteractiveTest,
1057 MAYBE_PopupPositioningMoved) { 1065 MAYBE_PopupPositioningMoved) {
1058 TestHelper("testMoved", "web_view/popup_positioning", NO_TEST_SERVER); 1066 TestHelper("testMoved", "web_view/popup_positioning", NO_TEST_SERVER);
1059 ASSERT_TRUE(guest_web_contents()); 1067 ASSERT_TRUE(guest_web_contents());
1060 PopupTestHelper(gfx::Point(20, 0)); 1068 PopupTestHelper(gfx::Point(20, 0));
1061 } 1069 }
1062 1070
1063 // Drag and drop inside a webview is currently only enabled for linux and mac, 1071 // Drag and drop inside a webview is currently only enabled for linux and mac,
1064 // but the tests don't work on anything except chromeos for now. This is because 1072 // but the tests don't work on anything except chromeos for now. This is because
1065 // of simulating mouse drag code's dependency on platforms. 1073 // of simulating mouse drag code's dependency on platforms.
1074
1075 // Flaky: https://crbug.com/700483
1066 #if defined(OS_CHROMEOS) && !defined(USE_OZONE) 1076 #if defined(OS_CHROMEOS) && !defined(USE_OZONE)
1067 IN_PROC_BROWSER_TEST_P(WebViewDragDropInteractiveTest, DragDropWithinWebView) { 1077 IN_PROC_BROWSER_TEST_P(WebViewDragDropInteractiveTest,
1078 DISABLED_DragDropWithinWebView) {
1068 LoadAndLaunchPlatformApp("web_view/dnd_within_webview", "connected"); 1079 LoadAndLaunchPlatformApp("web_view/dnd_within_webview", "connected");
1069 ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(GetPlatformAppWindow())); 1080 ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(GetPlatformAppWindow()));
1070 1081
1071 embedder_web_contents_ = GetFirstAppWindowWebContents(); 1082 embedder_web_contents_ = GetFirstAppWindowWebContents();
1072 gfx::Rect offset = embedder_web_contents_->GetContainerBounds(); 1083 gfx::Rect offset = embedder_web_contents_->GetContainerBounds();
1073 corner_ = gfx::Point(offset.x(), offset.y()); 1084 corner_ = gfx::Point(offset.x(), offset.y());
1074 1085
1075 // In the drag drop test we add 20px padding to the page body because on 1086 // In the drag drop test we add 20px padding to the page body because on
1076 // windows if we get too close to the edge of the window the resize cursor 1087 // windows if we get too close to the edge of the window the resize cursor
1077 // appears and we start dragging the window edge. 1088 // appears and we start dragging the window edge.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 } 1190 }
1180 1191
1181 // This test exercies the following scenario: 1192 // This test exercies the following scenario:
1182 // 1. An <input> in guest has focus. 1193 // 1. An <input> in guest has focus.
1183 // 2. User takes focus to embedder by clicking e.g. an <input> in embedder. 1194 // 2. User takes focus to embedder by clicking e.g. an <input> in embedder.
1184 // 3. User brings back the focus directly to the <input> in #1. 1195 // 3. User brings back the focus directly to the <input> in #1.
1185 // 1196 //
1186 // Now we need to make sure TextInputTypeChanged fires properly for the guest's 1197 // Now we need to make sure TextInputTypeChanged fires properly for the guest's
1187 // view upon step #3. We simply read the input type's state after #3 to 1198 // view upon step #3. We simply read the input type's state after #3 to
1188 // make sure it's not TEXT_INPUT_TYPE_NONE. 1199 // make sure it's not TEXT_INPUT_TYPE_NONE.
1189 IN_PROC_BROWSER_TEST_P(WebViewFocusInteractiveTest, Focus_FocusRestored) { 1200
1201 // Flaky on Linux - https://crbug.com/702572
1202 #if defined(OS_LINUX) || defined(OS_CHROMEOS)
1203 #define MAYBE_Focus_FocusRestored DISABLED_Focus_FocusRestored
1204 #else
1205 #define MAYBE_Focus_FocusRestored Focus_FocusRestored
1206 #endif
1207
1208 IN_PROC_BROWSER_TEST_P(WebViewFocusInteractiveTest, MAYBE_Focus_FocusRestored) {
1190 TestHelper("testFocusRestored", "web_view/focus", NO_TEST_SERVER); 1209 TestHelper("testFocusRestored", "web_view/focus", NO_TEST_SERVER);
1191 content::WebContents* embedder_web_contents = GetFirstAppWindowWebContents(); 1210 content::WebContents* embedder_web_contents = GetFirstAppWindowWebContents();
1192 ASSERT_TRUE(embedder_web_contents); 1211 ASSERT_TRUE(embedder_web_contents);
1193 ASSERT_TRUE(guest_web_contents()); 1212 ASSERT_TRUE(guest_web_contents());
1194 1213
1195 // 1) We click on the guest so that we get a focus event. 1214 // 1) We click on the guest so that we get a focus event.
1196 ExtensionTestMessageListener next_step_listener("TEST_STEP_PASSED", false); 1215 ExtensionTestMessageListener next_step_listener("TEST_STEP_PASSED", false);
1197 next_step_listener.set_failure_message("TEST_STEP_FAILED"); 1216 next_step_listener.set_failure_message("TEST_STEP_FAILED");
1198 { 1217 {
1199 content::SimulateMouseClickAt(guest_web_contents(), 1218 content::SimulateMouseClickAt(guest_web_contents(),
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 // Get the input value from the guest. 1590 // Get the input value from the guest.
1572 value.clear(); 1591 value.clear();
1573 ASSERT_TRUE(ExecuteScriptAndExtractString(guest_web_contents, 1592 ASSERT_TRUE(ExecuteScriptAndExtractString(guest_web_contents,
1574 "window.domAutomationController." 1593 "window.domAutomationController."
1575 "send(document.querySelector('" 1594 "send(document.querySelector('"
1576 "input').value)", 1595 "input').value)",
1577 &value)); 1596 &value));
1578 EXPECT_EQ("A B C D", value); 1597 EXPECT_EQ("A B C D", value);
1579 } 1598 }
1580 #endif // OS_MACOSX 1599 #endif // OS_MACOSX
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698