OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/search/instant_search_prerenderer.h" | 5 #include "chrome/browser/ui/search/instant_search_prerenderer.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 26 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
27 #include "chrome/common/instant_types.h" | 27 #include "chrome/common/instant_types.h" |
28 #include "chrome/common/render_messages.h" | 28 #include "chrome/common/render_messages.h" |
29 #include "components/omnibox/autocomplete_match.h" | 29 #include "components/omnibox/autocomplete_match.h" |
30 #include "content/public/browser/navigation_controller.h" | 30 #include "content/public/browser/navigation_controller.h" |
31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
32 #include "content/public/common/url_constants.h" | 32 #include "content/public/common/url_constants.h" |
33 #include "content/public/test/mock_render_process_host.h" | 33 #include "content/public/test/mock_render_process_host.h" |
34 #include "ipc/ipc_message.h" | 34 #include "ipc/ipc_message.h" |
35 #include "ipc/ipc_test_sink.h" | 35 #include "ipc/ipc_test_sink.h" |
36 #include "ui/gfx/size.h" | 36 #include "ui/gfx/geometry/size.h" |
37 | 37 |
38 using base::ASCIIToUTF16; | 38 using base::ASCIIToUTF16; |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 using content::Referrer; | 42 using content::Referrer; |
43 using prerender::Origin; | 43 using prerender::Origin; |
44 using prerender::PrerenderContents; | 44 using prerender::PrerenderContents; |
45 using prerender::PrerenderHandle; | 45 using prerender::PrerenderHandle; |
46 using prerender::PrerenderManager; | 46 using prerender::PrerenderManager; |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 Tuple<base::string16, EmbeddedSearchRequestParams> params; | 504 Tuple<base::string16, EmbeddedSearchRequestParams> params; |
505 ChromeViewMsg_SearchBoxSubmit::Read(message, ¶ms); | 505 ChromeViewMsg_SearchBoxSubmit::Read(message, ¶ms); |
506 EXPECT_EQ("foo", base::UTF16ToASCII(get<0>(params))); | 506 EXPECT_EQ("foo", base::UTF16ToASCII(get<0>(params))); |
507 EXPECT_EQ("f", base::UTF16ToASCII(get<1>(params).original_query)); | 507 EXPECT_EQ("f", base::UTF16ToASCII(get<1>(params).original_query)); |
508 EXPECT_EQ("utf-8", base::UTF16ToASCII(get<1>(params).input_encoding)); | 508 EXPECT_EQ("utf-8", base::UTF16ToASCII(get<1>(params).input_encoding)); |
509 EXPECT_EQ("", base::UTF16ToASCII(get<1>(params).rlz_parameter_value)); | 509 EXPECT_EQ("", base::UTF16ToASCII(get<1>(params).rlz_parameter_value)); |
510 EXPECT_EQ("chrome...0", | 510 EXPECT_EQ("chrome...0", |
511 base::UTF16ToASCII(get<1>(params).assisted_query_stats)); | 511 base::UTF16ToASCII(get<1>(params).assisted_query_stats)); |
512 } | 512 } |
513 #endif | 513 #endif |
OLD | NEW |