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

Side by Side Diff: chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc

Issue 2777853002: Disable flaky SitePerProcessTextInputManagerTest.TrackPageFocusEditableElement (Closed)
Patch Set: 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 | chrome/browser/ui/views/payments/payment_request_can_make_payment_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chrome_content_browser_client.h" 9 #include "chrome/browser/chrome_content_browser_client.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 // Similarly, we should receive updates when losing focus. 905 // Similarly, we should receive updates when losing focus.
906 for (auto* frame : frames) 906 for (auto* frame : frames)
907 EXPECT_FALSE(blur_input_and_return_editable_element_state(frame)); 907 EXPECT_FALSE(blur_input_and_return_editable_element_state(frame));
908 } 908 }
909 909
910 // This test tracks page level focused editable element tracking using 910 // This test tracks page level focused editable element tracking using
911 // WebContents. In a page with multiple frames, a frame is selected and 911 // WebContents. In a page with multiple frames, a frame is selected and
912 // focused. Then the <input> inside frame is both focused and blurred and and 912 // focused. Then the <input> inside frame is both focused and blurred and and
913 // in both cases the test verifies that WebContents is aware whether or not a 913 // in both cases the test verifies that WebContents is aware whether or not a
914 // focused editable element exists on the page. 914 // focused editable element exists on the page.
915 // Test is flaky on ChromeOS. crbug.com/705289
916 #if defined(OS_CHROMEOS)
917 #define MAYBE_TrackPageFocusEditableElement \
918 DISABLED_TrackPageFocusEditableElement
919 #else
920 #define MAYBE_TrackPageFocusEditableElement TrackPageFocusEditableElement
921 #endif
915 IN_PROC_BROWSER_TEST_F(SitePerProcessTextInputManagerTest, 922 IN_PROC_BROWSER_TEST_F(SitePerProcessTextInputManagerTest,
916 TrackPageFocusEditableElement) { 923 MAYBE_TrackPageFocusEditableElement) {
917 CreateIframePage("a(a, b(a))"); 924 CreateIframePage("a(a, b(a))");
918 std::vector<content::RenderFrameHost*> frames{ 925 std::vector<content::RenderFrameHost*> frames{
919 GetFrame(IndexVector{}), GetFrame(IndexVector{0}), 926 GetFrame(IndexVector{}), GetFrame(IndexVector{0}),
920 GetFrame(IndexVector{1}), GetFrame(IndexVector{1, 0})}; 927 GetFrame(IndexVector{1}), GetFrame(IndexVector{1, 0})};
921 for (size_t i = 0; i < frames.size(); ++i) 928 for (size_t i = 0; i < frames.size(); ++i)
922 AddInputFieldToFrame(frames[i], "text", "some text", true); 929 AddInputFieldToFrame(frames[i], "text", "some text", true);
923 930
924 auto focus_frame = [](content::RenderFrameHost* frame) { 931 auto focus_frame = [](content::RenderFrameHost* frame) {
925 EXPECT_TRUE(ExecuteScript(frame, "window.focus();")); 932 EXPECT_TRUE(ExecuteScript(frame, "window.focus();"));
926 }; 933 };
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 1363
1357 // Closing this WebContents while we still hold on to our TestBrowserClient. 1364 // Closing this WebContents while we still hold on to our TestBrowserClient.
1358 EXPECT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt( 1365 EXPECT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt(
1359 1, TabStripModel::CLOSE_USER_GESTURE)); 1366 1, TabStripModel::CLOSE_USER_GESTURE));
1360 1367
1361 // For the cleanup of the original WebContents in tab index 0. 1368 // For the cleanup of the original WebContents in tab index 0.
1362 content::SetBrowserClientForTesting(old_browser_client); 1369 content::SetBrowserClientForTesting(old_browser_client);
1363 } 1370 }
1364 #endif // defined(MAC_OSX) 1371 #endif // defined(MAC_OSX)
1365 #endif // !defined(OS_ANDROID) 1372 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_can_make_payment_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698