Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: chrome/browser/previews/previews_infobar_tab_helper_unittest.cc

Issue 2833523002: Adding opt out and previews type information to DRP pingback (Closed)
Patch Set: bengr comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/run_loop.h"
11 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
12 #include "base/threading/thread_task_runner_handle.h" 13 #include "base/threading/thread_task_runner_handle.h"
13 #include "chrome/browser/infobars/infobar_service.h" 14 #include "chrome/browser/infobars/infobar_service.h"
14 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 15 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
15 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 16 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
16 #include "chrome/browser/previews/previews_infobar_tab_helper.h" 17 #include "chrome/browser/previews/previews_infobar_tab_helper.h"
17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 18 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_ping back_client.h"
20 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h"
21 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test _utils.h" 22 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test _utils.h"
19 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" 23 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h"
20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h" 24 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h"
21 #include "components/offline_pages/core/offline_page_item.h" 25 #include "components/offline_pages/core/offline_page_item.h"
22 #include "components/offline_pages/core/request_header/offline_page_header.h" 26 #include "components/offline_pages/core/request_header/offline_page_header.h"
23 #include "components/prefs/pref_registry_simple.h" 27 #include "components/prefs/pref_registry_simple.h"
24 #include "components/proxy_config/proxy_config_pref_names.h" 28 #include "components/proxy_config/proxy_config_pref_names.h"
25 #include "content/public/browser/navigation_handle.h" 29 #include "content/public/browser/navigation_handle.h"
26 #include "content/public/test/web_contents_tester.h" 30 #include "content/public/test/web_contents_tester.h"
27 #include "net/http/http_util.h" 31 #include "net/http/http_util.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 EXPECT_EQ(1U, infobar_service->infobar_count()); 145 EXPECT_EQ(1U, infobar_service->infobar_count());
142 EXPECT_TRUE(infobar_tab_helper->displayed_preview_infobar()); 146 EXPECT_TRUE(infobar_tab_helper->displayed_preview_infobar());
143 147
144 // Navigate to reset the displayed state. 148 // Navigate to reset the displayed state.
145 content::WebContentsTester::For(web_contents()) 149 content::WebContentsTester::For(web_contents())
146 ->NavigateAndCommit(GURL(kTestUrl)); 150 ->NavigateAndCommit(GURL(kTestUrl));
147 151
148 EXPECT_FALSE(infobar_tab_helper->displayed_preview_infobar()); 152 EXPECT_FALSE(infobar_tab_helper->displayed_preview_infobar());
149 } 153 }
150 #endif // defined(OS_ANDROID) 154 #endif // defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698