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

Side by Side Diff: chrome/browser/page_cycler/page_cycler_unittest.cc

Issue 10386134: Record API fix adding FirstRun, and allowing repeat-count in capture (plus some browsertests along … (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Retrying due to patch failure Created 8 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 | « chrome/browser/extensions/extension_record_api_test.cc ('k') | chrome/chrome_browser.gypi » ('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 (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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_split.h" 7 #include "base/string_split.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 render_view_host); 76 render_view_host);
77 } 77 }
78 78
79 void PageCyclerDidFinishLoad(int64 frame_id, 79 void PageCyclerDidFinishLoad(int64 frame_id,
80 const GURL& validated_url, 80 const GURL& validated_url,
81 bool is_main_frame) { 81 bool is_main_frame) {
82 PageCycler::DidFinishLoad(frame_id, validated_url, is_main_frame); 82 PageCycler::DidFinishLoad(frame_id, validated_url, is_main_frame);
83 } 83 }
84 84
85 private: 85 private:
86
87 // We need to override Finish() because the calls to exit the browser in a 86 // We need to override Finish() because the calls to exit the browser in a
88 // real PageCycler do not work in unittests (they interfere with later tests). 87 // real PageCycler do not work in unittests (they interfere with later tests).
89 virtual void Finish() OVERRIDE { 88 virtual void Finish() OVERRIDE {
90 BrowserList::RemoveObserver(this); 89 BrowserList::RemoveObserver(this);
91 Release(); 90 Release();
92 } 91 }
93 92
94 virtual ~MockPageCycler() {}\ 93 virtual ~MockPageCycler() {}\
95 94
96 DISALLOW_COPY_AND_ASSIGN(MockPageCycler); 95 DISALLOW_COPY_AND_ASSIGN(MockPageCycler);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 .WillRepeatedly(Invoke(page_cycler(), 338 .WillRepeatedly(Invoke(page_cycler(),
340 &MockPageCycler::PageCyclerDidFinishLoad)); 339 &MockPageCycler::PageCyclerDidFinishLoad));
341 340
342 for (int i = 0; i < kNumLoads; ++i) 341 for (int i = 0; i < kNumLoads; ++i)
343 FinishLoad(); 342 FinishLoad();
344 343
345 PumpLoop(); 344 PumpLoop();
346 EXPECT_FALSE(PathExists(errors_file())); 345 EXPECT_FALSE(PathExists(errors_file()));
347 ASSERT_TRUE(PathExists(stats_file())); 346 ASSERT_TRUE(PathExists(stats_file()));
348 } 347 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_record_api_test.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698