| 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/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "chrome/browser/history/history_service.h" | 15 #include "chrome/browser/history/history_service.h" |
| 16 #include "chrome/browser/history/history_service_factory.h" | 16 #include "chrome/browser/history/history_service_factory.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/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
| 20 #include "components/autocomplete/autocomplete_match.h" | |
| 21 #include "components/history/core/browser/in_memory_database.h" | 20 #include "components/history/core/browser/in_memory_database.h" |
| 22 #include "components/history/core/browser/url_database.h" | 21 #include "components/history/core/browser/url_database.h" |
| 22 #include "components/omnibox/autocomplete_match.h" |
| 23 #include "content/public/test/test_browser_thread.h" | 23 #include "content/public/test/test_browser_thread.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 | 25 |
| 26 using base::ASCIIToUTF16; | 26 using base::ASCIIToUTF16; |
| 27 using content::BrowserThread; | 27 using content::BrowserThread; |
| 28 using predictors::AutocompleteActionPredictor; | 28 using predictors::AutocompleteActionPredictor; |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 struct TestUrlInfo { | 32 struct TestUrlInfo { |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 AutocompleteActionPredictor::ACTION_PRERENDER) ? | 375 AutocompleteActionPredictor::ACTION_PRERENDER) ? |
| 376 AutocompleteActionPredictor::ACTION_PRECONNECT : | 376 AutocompleteActionPredictor::ACTION_PRECONNECT : |
| 377 test_url_db[i].expected_action; | 377 test_url_db[i].expected_action; |
| 378 EXPECT_EQ(expected_action, | 378 EXPECT_EQ(expected_action, |
| 379 predictor()->RecommendAction(test_url_db[i].user_text, match)) | 379 predictor()->RecommendAction(test_url_db[i].user_text, match)) |
| 380 << "Unexpected action for " << match.destination_url; | 380 << "Unexpected action for " << match.destination_url; |
| 381 } | 381 } |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace predictors | 384 } // namespace predictors |
| OLD | NEW |