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

Side by Side Diff: chrome/browser/autocomplete/network_action_predictor_unittest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/autocomplete/network_action_predictor.h" 5 #include "chrome/browser/autocomplete/network_action_predictor.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/autocomplete/autocomplete_match.h" 10 #include "chrome/browser/autocomplete/autocomplete_match.h"
11 #include "chrome/browser/history/history.h" 11 #include "chrome/browser/history/history.h"
12 #include "chrome/browser/history/url_database.h" 12 #include "chrome/browser/history/url_database.h"
13 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "content/test/test_browser_thread.h" 14 #include "content/test/test_browser_thread.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 using content::BrowserThread;
18
17 namespace { 19 namespace {
18 20
19 struct TestUrlInfo { 21 struct TestUrlInfo {
20 GURL url; 22 GURL url;
21 string16 title; 23 string16 title;
22 int typed_count; 24 int typed_count;
23 int days_from_now; 25 int days_from_now;
24 string16 user_text; 26 string16 user_text;
25 NetworkActionPredictor::Action expected_action; 27 NetworkActionPredictor::Action expected_action;
26 } test_url_db[] = { 28 } test_url_db[] = {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 (test_url_db[i].expected_action == 131 (test_url_db[i].expected_action ==
130 NetworkActionPredictor::ACTION_PRERENDER) ? 132 NetworkActionPredictor::ACTION_PRERENDER) ?
131 NetworkActionPredictor::ACTION_PRECONNECT : 133 NetworkActionPredictor::ACTION_PRECONNECT :
132 test_url_db[i].expected_action; 134 test_url_db[i].expected_action;
133 135
134 EXPECT_EQ(expected, 136 EXPECT_EQ(expected,
135 predictor().RecommendAction(test_url_db[i].user_text, match)) 137 predictor().RecommendAction(test_url_db[i].user_text, match))
136 << "Unexpected action for " << match.destination_url; 138 << "Unexpected action for " << match.destination_url;
137 } 139 }
138 } 140 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider_unittest.cc ('k') | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698