| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <memory> | 6 #include <memory> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 web_contents->SetDelegate(old_delegate); | 62 web_contents->SetDelegate(old_delegate); |
| 63 | 63 |
| 64 return matches_; | 64 return matches_; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void FindReply(WebContents* web_contents, | 67 void FindReply(WebContents* web_contents, |
| 68 int request_id, | 68 int request_id, |
| 69 int number_of_matches, | 69 int number_of_matches, |
| 70 const gfx::Rect& selection_rect, | 70 const gfx::Rect& selection_rect, |
| 71 int active_match_ordinal, | 71 int active_match_ordinal, |
| 72 bool final_update) override { | 72 bool final_update, |
| 73 bool was_frame_removal) override { |
| 73 if (final_update) { | 74 if (final_update) { |
| 74 matches_ = number_of_matches; | 75 matches_ = number_of_matches; |
| 75 run_loop_.Quit(); | 76 run_loop_.Quit(); |
| 76 } | 77 } |
| 77 } | 78 } |
| 78 | 79 |
| 79 static int global_request_id; | 80 static int global_request_id; |
| 80 | 81 |
| 81 private: | 82 private: |
| 82 std::string search_; | 83 std::string search_; |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 base::ThreadRestrictions::ScopedAllowIO allow_io_for_content_verification; | 667 base::ThreadRestrictions::ScopedAllowIO allow_io_for_content_verification; |
| 667 ASSERT_TRUE(base::ReadFileToString(path, &mhtml)); | 668 ASSERT_TRUE(base::ReadFileToString(path, &mhtml)); |
| 668 } | 669 } |
| 669 | 670 |
| 670 // Make sure the overlay is removed. | 671 // Make sure the overlay is removed. |
| 671 EXPECT_THAT(mhtml, Not(HasSubstr("class=3D\"overlay"))); | 672 EXPECT_THAT(mhtml, Not(HasSubstr("class=3D\"overlay"))); |
| 672 EXPECT_THAT(mhtml, Not(HasSubstr("class=3D\"modal"))); | 673 EXPECT_THAT(mhtml, Not(HasSubstr("class=3D\"modal"))); |
| 673 } | 674 } |
| 674 | 675 |
| 675 } // namespace content | 676 } // namespace content |
| OLD | NEW |