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

Side by Side Diff: chrome/browser/history/history_browsertest.cc

Issue 10500016: Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/history/history.h" 11 #include "chrome/browser/history/history.h"
12 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
18 #include "chrome/test/base/in_process_browser_test.h" 18 #include "chrome/test/base/in_process_browser_test.h"
19 #include "chrome/test/base/ui_test_utils.h" 19 #include "chrome/test/base/ui_test_utils.h"
20 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
21 #include "content/test/test_browser_thread.h" 21 #include "content/public/test/test_browser_thread.h"
22 #include "googleurl/src/gurl.h" 22 #include "googleurl/src/gurl.h"
23 23
24 using content::BrowserThread; 24 using content::BrowserThread;
25 25
26 namespace { 26 namespace {
27 27
28 // Note: WaitableEvent is not used for synchronization between the main thread 28 // Note: WaitableEvent is not used for synchronization between the main thread
29 // and history backend thread because the history subsystem posts tasks back 29 // and history backend thread because the history subsystem posts tasks back
30 // to the main thread. Had we tried to Signal an event in such a task 30 // to the main thread. Had we tried to Signal an event in such a task
31 // and Wait for it on the main thread, the task would not run at all because 31 // and Wait for it on the main thread, the task would not run at all because
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // Mainly, this is to ensure we send a synchronous message to the renderer 299 // Mainly, this is to ensure we send a synchronous message to the renderer
300 // so that we're not susceptible (less susceptible?) to a race condition. 300 // so that we're not susceptible (less susceptible?) to a race condition.
301 // Should a race condition ever trigger, it won't result in flakiness. 301 // Should a race condition ever trigger, it won't result in flakiness.
302 int num = ui_test_utils::FindInPage( 302 int num = ui_test_utils::FindInPage(
303 browser()->GetSelectedTabContentsWrapper(), ASCIIToUTF16("<img"), true, 303 browser()->GetSelectedTabContentsWrapper(), ASCIIToUTF16("<img"), true,
304 true, NULL); 304 true, NULL);
305 EXPECT_GT(num, 0); 305 EXPECT_GT(num, 0);
306 EXPECT_EQ(ASCIIToUTF16("History"), 306 EXPECT_EQ(ASCIIToUTF16("History"),
307 browser()->GetSelectedWebContents()->GetTitle()); 307 browser()->GetSelectedWebContents()->GetTitle());
308 } 308 }
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend_unittest.cc ('k') | chrome/browser/history/in_memory_url_index_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698