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

Side by Side Diff: content/public/test/browser_side_navigation_test_utils.cc

Issue 2368913002: Fix stream errors that occur after a stream starts not propagating. (Closed)
Patch Set: fix tests Created 4 years, 2 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 #include "content/public/test/browser_side_navigation_test_utils.h" 5 #include "content/public/test/browser_side_navigation_test_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void BrowserSideNavigationTearDown() { 55 void BrowserSideNavigationTearDown() {
56 DCHECK_CURRENTLY_ON(BrowserThread::UI); 56 DCHECK_CURRENTLY_ON(BrowserThread::UI);
57 browser_side_navigation_test_utils.Get().reset(nullptr); 57 browser_side_navigation_test_utils.Get().reset(nullptr);
58 } 58 }
59 59
60 std::unique_ptr<StreamHandle> MakeEmptyStream() { 60 std::unique_ptr<StreamHandle> MakeEmptyStream() {
61 GURL url(std::string(url::kBlobScheme) + "://" + base::GenerateGUID()); 61 GURL url(std::string(url::kBlobScheme) + "://" + base::GenerateGUID());
62 StreamRegistry* stream_registry = 62 StreamRegistry* stream_registry =
63 browser_side_navigation_test_utils.Get()->stream_registry(); 63 browser_side_navigation_test_utils.Get()->stream_registry();
64 scoped_refptr<Stream> stream(new Stream(stream_registry, NULL, url)); 64 scoped_refptr<Stream> stream(new Stream(stream_registry, NULL, url));
65 stream->Finalize(); 65 stream->Finalize(0);
66 return stream->CreateHandle(); 66 return stream->CreateHandle();
67 } 67 }
68 68
69 void EnableBrowserSideNavigation() { 69 void EnableBrowserSideNavigation() {
70 base::CommandLine::ForCurrentProcess()->AppendSwitch( 70 base::CommandLine::ForCurrentProcess()->AppendSwitch(
71 switches::kEnableBrowserSideNavigation); 71 switches::kEnableBrowserSideNavigation);
72 } 72 }
73 73
74 } // namespace content 74 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698