| Index: content/browser/find_request_manager_browsertest.cc
|
| diff --git a/content/browser/find_request_manager_browsertest.cc b/content/browser/find_request_manager_browsertest.cc
|
| index 3e34167e92e4486913ab3fd30ccb44702cb6b14d..313367ba8132cf59e670d1e3e8565a132bd5500e 100644
|
| --- a/content/browser/find_request_manager_browsertest.cc
|
| +++ b/content/browser/find_request_manager_browsertest.cc
|
| @@ -319,6 +319,35 @@ IN_PROC_BROWSER_TEST_P(FindRequestManagerTest, DISABLED_AddFrame) {
|
| EXPECT_EQ(5, results.active_match_ordinal);
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(FindRequestManagerTest, MAYBE(RemoveFrame)) {
|
| + LoadAndWait("/find_with_frame_removal.html");
|
| +
|
| + blink::WebFindOptions options;
|
| + Find("hello", options);
|
| + delegate()->WaitForFinalReply();
|
| + FindResults results = delegate()->GetFindResults();
|
| +
|
| + EXPECT_EQ(last_request_id(), results.request_id);
|
| + EXPECT_EQ(2, results.number_of_matches);
|
| + EXPECT_EQ(1, results.active_match_ordinal);
|
| +
|
| + // Remove the iframe. Make sure search results are updated, but that it's
|
| + // noted that the update was due to a frame removal so that we don't beep.
|
| + // See https://crbug.com/682299.
|
| + std::string script(
|
| + "var iframes = document.getElementsByTagName('iframe');\n"
|
| + "for (var i = 0; i < iframes.length; i++)\n"
|
| + " iframes[i].parentNode.removeChild(iframes[i]);");
|
| + delegate()->MarkNextReply();
|
| + ASSERT_TRUE(ExecuteScript(shell(), script));
|
| + delegate()->WaitForNextReply();
|
| +
|
| + results = delegate()->GetFindResults();
|
| + EXPECT_EQ(1, results.number_of_matches);
|
| + EXPECT_EQ(1, results.active_match_ordinal);
|
| + EXPECT_TRUE(results.was_frame_removal);
|
| +}
|
| +
|
| // Tests adding a frame during a find session where there were previously no
|
| // matches.
|
| IN_PROC_BROWSER_TEST_F(FindRequestManagerTest, MAYBE(AddFrameAfterNoMatches)) {
|
|
|