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

Side by Side Diff: content/test/browser_side_navigation_test_utils.h

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_TEST_BROWSER_SIDE_NAVIGATION_TEST_UTILS_H_ 5 #ifndef CONTENT_TEST_BROWSER_SIDE_NAVIGATION_TEST_UTILS_H_
6 #define CONTENT_TEST_BROWSER_SIDE_NAVIGATION_TEST_UTILS_H_ 6 #define CONTENT_TEST_BROWSER_SIDE_NAVIGATION_TEST_UTILS_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 class StreamHandle; 14 class StreamHandle;
14 15
15 // Initializes the browser side navigation test utils. Following this call, all 16 // Initializes the browser side navigation test utils. Following this call, all
16 // NavigationURLLoader objects created will be TestNavigationURLLoaders instead 17 // NavigationURLLoader objects created will be TestNavigationURLLoaders instead
17 // of NavigationURLloaderImpls. This should be called before any call in the UI 18 // of NavigationURLloaderImpls. This should be called before any call in the UI
18 // thread unit tests that will start a navigation (eg. 19 // thread unit tests that will start a navigation (eg.
19 // TestWebContents::NavigateAndCommit). 20 // TestWebContents::NavigateAndCommit).
20 void BrowserSideNavigationSetUp(); 21 void BrowserSideNavigationSetUp();
21 22
22 // Tears down the browser side navigation test utils. 23 // Tears down the browser side navigation test utils.
23 void BrowserSideNavigationTearDown(); 24 void BrowserSideNavigationTearDown();
24 25
25 // Returns an empty stream. Used when faking a navigation commit notification 26 // Returns an empty stream. Used when faking a navigation commit notification
26 // from the IO thread with a TestNavigationURLLoader. 27 // from the IO thread with a TestNavigationURLLoader.
27 scoped_ptr<StreamHandle> MakeEmptyStream(); 28 std::unique_ptr<StreamHandle> MakeEmptyStream();
28 29
29 // If a test needs to run with browser side navigation enabled, call this 30 // If a test needs to run with browser side navigation enabled, call this
30 // function before doing any setup. In particular, for tests inheriting from 31 // function before doing any setup. In particular, for tests inheriting from
31 // RenderViewHostTestHarness, call this function before calling 32 // RenderViewHostTestHarness, call this function before calling
32 // RenderViewHostTestHarness::SetUp. 33 // RenderViewHostTestHarness::SetUp.
33 void EnableBrowserSideNavigation(); 34 void EnableBrowserSideNavigation();
34 35
35 } // namespace content 36 } // namespace content
36 37
37 #endif // CONTENT_TEST_BROWSER_SIDE_NAVIGATION_TEST_UTILS_H_ 38 #endif // CONTENT_TEST_BROWSER_SIDE_NAVIGATION_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « content/test/blink_test_environment.cc ('k') | content/test/browser_side_navigation_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698