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

Side by Side Diff: content/browser/download/mhtml_generation_browsertest.cc

Issue 2026773002: Fix for flaky MHTMLGenerationTest.ViewedMHTMLContainsNoStoreContentIfNoCacheControlPolicy test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (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 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 return matches_; 58 return matches_;
59 } 59 }
60 60
61 void FindReply(WebContents* web_contents, 61 void FindReply(WebContents* web_contents,
62 int request_id, 62 int request_id,
63 int number_of_matches, 63 int number_of_matches,
64 const gfx::Rect& selection_rect, 64 const gfx::Rect& selection_rect,
65 int active_match_ordinal, 65 int active_match_ordinal,
66 bool final_update) override { 66 bool final_update) override {
67 matches_ = number_of_matches; 67 if (final_update) {
68 run_loop_.Quit(); 68 matches_ = number_of_matches;
69 run_loop_.Quit();
70 }
69 } 71 }
70 72
71 static int global_request_id; 73 static int global_request_id;
72 74
73 private: 75 private:
74 std::string search_; 76 std::string search_;
75 int matches_; 77 int matches_;
76 base::RunLoop run_loop_; 78 base::RunLoop run_loop_;
77 79
78 DISALLOW_COPY_AND_ASSIGN(FindTrackingDelegate); 80 DISALLOW_COPY_AND_ASSIGN(FindTrackingDelegate);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 470
469 // Make sure that URLs of both frames are present 471 // Make sure that URLs of both frames are present
470 // (note that these are single-line regexes). 472 // (note that these are single-line regexes).
471 EXPECT_THAT( 473 EXPECT_THAT(
472 mhtml, 474 mhtml,
473 ContainsRegex("Content-Location:.*/frame_tree/page_with_one_frame.html")); 475 ContainsRegex("Content-Location:.*/frame_tree/page_with_one_frame.html"));
474 EXPECT_THAT(mhtml, ContainsRegex("Content-Location:.*/title1.html")); 476 EXPECT_THAT(mhtml, ContainsRegex("Content-Location:.*/title1.html"));
475 } 477 }
476 478
477 } // namespace content 479 } // 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