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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc

Issue 2022283003: Record offline histograms with suffix via Histogram::FactoryGet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/android/offline_pages/offline_page_tab_helper.h" 5 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" 14 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
15 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h " 15 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.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/offline_pages/client_namespace_constants.h"
17 #include "components/offline_pages/offline_page_feature.h" 18 #include "components/offline_pages/offline_page_feature.h"
18 #include "components/offline_pages/offline_page_item.h" 19 #include "components/offline_pages/offline_page_item.h"
19 #include "components/offline_pages/offline_page_model.h" 20 #include "components/offline_pages/offline_page_model.h"
20 #include "components/offline_pages/offline_page_test_archiver.h" 21 #include "components/offline_pages/offline_page_test_archiver.h"
21 #include "components/offline_pages/offline_page_types.h" 22 #include "components/offline_pages/offline_page_types.h"
22 #include "content/public/browser/navigation_entry.h" 23 #include "content/public/browser/navigation_entry.h"
23 #include "content/public/browser/web_contents.h" 24 #include "content/public/browser/web_contents.h"
24 #include "net/base/net_errors.h" 25 #include "net/base/net_errors.h"
25 #include "net/base/network_change_notifier.h" 26 #include "net/base/network_change_notifier.h"
26 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 StartLoad(online_url()); 214 StartLoad(online_url());
214 RunUntilIdle(); 215 RunUntilIdle();
215 EXPECT_EQ(online_url(), controller().GetPendingEntry()->GetURL()); 216 EXPECT_EQ(online_url(), controller().GetPendingEntry()->GetURL());
216 217
217 // Redirection will be done immediately on navigation end with error. 218 // Redirection will be done immediately on navigation end with error.
218 FailLoad(online_url()); 219 FailLoad(online_url());
219 EXPECT_EQ(offline_url(), controller().GetPendingEntry()->GetURL()); 220 EXPECT_EQ(offline_url(), controller().GetPendingEntry()->GetURL());
220 } 221 }
221 222
222 } // namespace offline_pages 223 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698