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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/gtest_prod_util.h" | 7 #include "base/gtest_prod_util.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 bool end_in_instant_process; | 47 bool end_in_instant_process; |
48 }; | 48 }; |
49 | 49 |
50 // Test cases for when Google is the initial, but not final provider. | 50 // Test cases for when Google is the initial, but not final provider. |
51 const TabReloadTestCase kTabReloadTestCasesFinalProviderNotGoogle[] = { | 51 const TabReloadTestCase kTabReloadTestCasesFinalProviderNotGoogle[] = { |
52 {"Local Embedded NTP", chrome::kChromeSearchLocalNtpUrl, | 52 {"Local Embedded NTP", chrome::kChromeSearchLocalNtpUrl, |
53 true, true, true, true}, | 53 true, true, true, true}, |
54 {"Remote Embedded NTP", "https://www.google.com/newtab", | 54 {"Remote Embedded NTP", "https://www.google.com/newtab", |
55 true, true, false, false}, | 55 true, true, false, false}, |
56 {"Remote Embedded SERP", "https://www.google.com/url?strk&bar=search+terms", | 56 {"Remote Embedded SERP", "https://www.google.com/url?strk&bar=search+terms", |
57 true, true, false, false}, | 57 false, false, false, false}, |
58 {"Other NTP", "https://bar.com/newtab", | 58 {"Other NTP", "https://bar.com/newtab", |
59 false, false, false, false} | 59 false, false, false, false} |
60 }; | 60 }; |
61 | 61 |
62 // Test cases for when Google is both the initial and final provider. | 62 // Test cases for when Google is both the initial and final provider. |
63 const TabReloadTestCase kTabReloadTestCasesFinalProviderGoogle[] = { | 63 const TabReloadTestCase kTabReloadTestCasesFinalProviderGoogle[] = { |
64 {"Local Embedded NTP", chrome::kChromeSearchLocalNtpUrl, | 64 {"Local Embedded NTP", chrome::kChromeSearchLocalNtpUrl, |
65 true, true, true, true}, | 65 true, true, true, true}, |
66 {"Remote Embedded NTP", "https://www.google.com/newtab", | 66 {"Remote Embedded NTP", "https://www.google.com/newtab", |
67 true, false, true, true}, | 67 true, false, true, true}, |
68 {"Remote Embedded SERP", "https://www.google.com/url?strk&bar=search+terms", | 68 {"Remote Embedded SERP", "https://www.google.com/url?strk&bar=search+terms", |
69 true, true, false, false}, | 69 false, false, false, false}, |
70 {"Other NTP", "https://bar.com/newtab", | 70 {"Other NTP", "https://bar.com/newtab", |
71 false, false, false, false} | 71 false, false, false, false} |
72 }; | 72 }; |
73 | 73 |
74 | 74 |
75 class FakeWebContentsObserver : public content::WebContentsObserver { | 75 class FakeWebContentsObserver : public content::WebContentsObserver { |
76 public: | 76 public: |
77 explicit FakeWebContentsObserver(content::WebContents* contents) | 77 explicit FakeWebContentsObserver(content::WebContents* contents) |
78 : WebContentsObserver(contents), | 78 : WebContentsObserver(contents), |
79 contents_(contents), | 79 contents_(contents), |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 browser.reset(NULL); | 221 browser.reset(NULL); |
222 window.reset(NULL); | 222 window.reset(NULL); |
223 EXPECT_FALSE(IsInstantServiceObserver(bic)) | 223 EXPECT_FALSE(IsInstantServiceObserver(bic)) |
224 << "New BrowserInstantController should register as InstantServiceObserver"; | 224 << "New BrowserInstantController should register as InstantServiceObserver"; |
225 } | 225 } |
226 | 226 |
227 } // namespace | 227 } // namespace |
228 | 228 |
229 } // namespace chrome | 229 } // namespace chrome |
OLD | NEW |