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

Side by Side Diff: content/browser/find_request_manager_browsertest.cc

Issue 2539603002: Disable FindRequestManagerTest.AddFrame and RemoveFrame. (Closed)
Patch Set: Created 4 years 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 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/web_contents/web_contents_impl.h" 7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/browser/notification_types.h" 8 #include "content/public/browser/notification_types.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "content/public/test/browser_test_utils.h" 10 #include "content/public/test/browser_test_utils.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 delegate()->WaitForFinalReply(); 440 delegate()->WaitForFinalReply();
441 441
442 FindResults results = delegate()->GetFindResults(); 442 FindResults results = delegate()->GetFindResults();
443 EXPECT_EQ(last_request_id(), results.request_id); 443 EXPECT_EQ(last_request_id(), results.request_id);
444 EXPECT_EQ(19, results.number_of_matches); 444 EXPECT_EQ(19, results.number_of_matches);
445 EXPECT_EQ(last_request_id() % results.number_of_matches, 445 EXPECT_EQ(last_request_id() % results.number_of_matches,
446 results.active_match_ordinal); 446 results.active_match_ordinal);
447 } 447 }
448 448
449 // Tests removing a frame during a find session. 449 // Tests removing a frame during a find session.
450 IN_PROC_BROWSER_TEST_P(FindRequestManagerTest, MAYBE(RemoveFrame)) { 450 // TODO(crbug.com/657331): Test is flaky on all platforms.
451 IN_PROC_BROWSER_TEST_P(FindRequestManagerTest, DISABLED_RemoveFrame) {
451 LoadMultiFramePage(2 /* height */, GetParam() /* cross_process */); 452 LoadMultiFramePage(2 /* height */, GetParam() /* cross_process */);
452 453
453 blink::WebFindOptions options; 454 blink::WebFindOptions options;
454 Find("result", options); 455 Find("result", options);
455 delegate()->WaitForFinalReply(); 456 delegate()->WaitForFinalReply();
456 options.findNext = true; 457 options.findNext = true;
457 options.forward = false; 458 options.forward = false;
458 Find("result", options); 459 Find("result", options);
459 Find("result", options); 460 Find("result", options);
460 Find("result", options); 461 Find("result", options);
(...skipping 11 matching lines...) Expand all
472 root->RemoveChild(root->child_at(0)); 473 root->RemoveChild(root->child_at(0));
473 474
474 // The number of matches and active match ordinal should update automatically 475 // The number of matches and active match ordinal should update automatically
475 // to exclude the matches from the removed frame. 476 // to exclude the matches from the removed frame.
476 results = delegate()->GetFindResults(); 477 results = delegate()->GetFindResults();
477 EXPECT_EQ(12, results.number_of_matches); 478 EXPECT_EQ(12, results.number_of_matches);
478 EXPECT_EQ(8, results.active_match_ordinal); 479 EXPECT_EQ(8, results.active_match_ordinal);
479 } 480 }
480 481
481 // Tests adding a frame during a find session. 482 // Tests adding a frame during a find session.
482 IN_PROC_BROWSER_TEST_P(FindRequestManagerTest, MAYBE(AddFrame)) { 483 // TODO(crbug.com/657331): Test is flaky on all platforms.
484 IN_PROC_BROWSER_TEST_P(FindRequestManagerTest, DISABLED_AddFrame) {
483 LoadMultiFramePage(2 /* height */, GetParam() /* cross_process */); 485 LoadMultiFramePage(2 /* height */, GetParam() /* cross_process */);
484 486
485 blink::WebFindOptions options; 487 blink::WebFindOptions options;
486 Find("result", options); 488 Find("result", options);
487 options.findNext = true; 489 options.findNext = true;
488 Find("result", options); 490 Find("result", options);
489 Find("result", options); 491 Find("result", options);
490 Find("result", options); 492 Find("result", options);
491 Find("result", options); 493 Find("result", options);
492 delegate()->WaitForFinalReply(); 494 delegate()->WaitForFinalReply();
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 delegate()->MarkNextReply(); 805 delegate()->MarkNextReply();
804 contents()->ActivateNearestFindResult( 806 contents()->ActivateNearestFindResult(
805 rects[order[i]].CenterPoint().x(), rects[order[i]].CenterPoint().y()); 807 rects[order[i]].CenterPoint().x(), rects[order[i]].CenterPoint().y());
806 delegate()->WaitForNextReply(); 808 delegate()->WaitForNextReply();
807 EXPECT_EQ(order[i] + 1, delegate()->GetFindResults().active_match_ordinal); 809 EXPECT_EQ(order[i] + 1, delegate()->GetFindResults().active_match_ordinal);
808 } 810 }
809 } 811 }
810 #endif // defined(OS_ANDROID) 812 #endif // defined(OS_ANDROID)
811 813
812 } // namespace content 814 } // namespace content
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