| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/previews/previews_infobar_tab_helper.h" | 5 #include "chrome/browser/previews/previews_infobar_tab_helper.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
| 12 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 12 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 13 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 13 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 14 #include "chrome/browser/previews/previews_infobar_tab_helper.h" | 14 #include "chrome/browser/previews/previews_infobar_tab_helper.h" |
| 15 #include "chrome/common/features.h" | 15 #include "chrome/common/features.h" |
| 16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test
_utils.h" | 17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test
_utils.h" |
| 18 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" | 18 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" |
| 19 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" | 19 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" |
| 20 #include "components/offline_pages/offline_page_item.h" | 20 #include "components/offline_pages/core/offline_page_item.h" |
| 21 #include "components/offline_pages/request_header/offline_page_header.h" | 21 #include "components/offline_pages/core/request_header/offline_page_header.h" |
| 22 #include "components/prefs/pref_registry_simple.h" | 22 #include "components/prefs/pref_registry_simple.h" |
| 23 #include "components/proxy_config/proxy_config_pref_names.h" | 23 #include "components/proxy_config/proxy_config_pref_names.h" |
| 24 #include "content/public/browser/navigation_handle.h" | 24 #include "content/public/browser/navigation_handle.h" |
| 25 #include "content/public/test/web_contents_tester.h" | 25 #include "content/public/test/web_contents_tester.h" |
| 26 #include "net/http/http_util.h" | 26 #include "net/http/http_util.h" |
| 27 | 27 |
| 28 #if BUILDFLAG(ANDROID_JAVA_UI) | 28 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 29 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" | 29 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" |
| 30 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 30 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| 31 | 31 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 EXPECT_EQ(1U, infobar_service->infobar_count()); | 139 EXPECT_EQ(1U, infobar_service->infobar_count()); |
| 140 EXPECT_TRUE(infobar_tab_helper->displayed_preview_infobar()); | 140 EXPECT_TRUE(infobar_tab_helper->displayed_preview_infobar()); |
| 141 | 141 |
| 142 // Navigate to reset the displayed state. | 142 // Navigate to reset the displayed state. |
| 143 content::WebContentsTester::For(web_contents()) | 143 content::WebContentsTester::For(web_contents()) |
| 144 ->NavigateAndCommit(GURL(kTestUrl)); | 144 ->NavigateAndCommit(GURL(kTestUrl)); |
| 145 | 145 |
| 146 EXPECT_FALSE(infobar_tab_helper->displayed_preview_infobar()); | 146 EXPECT_FALSE(infobar_tab_helper->displayed_preview_infobar()); |
| 147 } | 147 } |
| 148 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 148 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| OLD | NEW |