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 "chrome/browser/predictors/autocomplete_action_predictor.h" | 5 #include "chrome/browser/predictors/autocomplete_action_predictor.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/autocomplete/autocomplete_match.h" | 13 #include "chrome/browser/autocomplete/autocomplete_match.h" |
14 #include "chrome/browser/history/history.h" | 14 #include "chrome/browser/history/history.h" |
15 #include "chrome/browser/history/in_memory_database.h" | 15 #include "chrome/browser/history/in_memory_database.h" |
16 #include "chrome/browser/history/url_database.h" | 16 #include "chrome/browser/history/url_database.h" |
17 #include "chrome/browser/prerender/prerender_field_trial.h" | 17 #include "chrome/browser/prerender/prerender_field_trial.h" |
18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/common/guid.h" | 19 #include "chrome/common/guid.h" |
20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
21 #include "content/test/test_browser_thread.h" | 21 #include "content/public/test/test_browser_thread.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 using content::BrowserThread; | 24 using content::BrowserThread; |
25 using predictors::AutocompleteActionPredictor; | 25 using predictors::AutocompleteActionPredictor; |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 struct TestUrlInfo { | 29 struct TestUrlInfo { |
30 GURL url; | 30 GURL url; |
31 string16 title; | 31 string16 title; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 AutocompleteActionPredictor::ACTION_PRERENDER) ? | 361 AutocompleteActionPredictor::ACTION_PRERENDER) ? |
362 AutocompleteActionPredictor::ACTION_PRECONNECT : | 362 AutocompleteActionPredictor::ACTION_PRECONNECT : |
363 test_url_db[i].expected_action; | 363 test_url_db[i].expected_action; |
364 EXPECT_EQ(expected_action, | 364 EXPECT_EQ(expected_action, |
365 predictor()->RecommendAction(test_url_db[i].user_text, match)) | 365 predictor()->RecommendAction(test_url_db[i].user_text, match)) |
366 << "Unexpected action for " << match.destination_url; | 366 << "Unexpected action for " << match.destination_url; |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 } // namespace predictors | 370 } // namespace predictors |
OLD | NEW |