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

Side by Side Diff: content/browser/plugin_browsertest.cc

Issue 845973005: [New Tab Page] Change the mechanism to intercept online NTP errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved to profile_io_data Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/loader/resource_dispatcher_host_impl.h" 10 #include "content/browser/loader/resource_dispatcher_host_impl.h"
(...skipping 21 matching lines...) Expand all
32 #else 32 #else
33 #define MAYBE(x) x 33 #define MAYBE(x) x
34 #endif 34 #endif
35 35
36 using base::ASCIIToUTF16; 36 using base::ASCIIToUTF16;
37 37
38 namespace content { 38 namespace content {
39 namespace { 39 namespace {
40 40
41 void SetUrlRequestMock(const base::FilePath& path) { 41 void SetUrlRequestMock(const base::FilePath& path) {
42 net::URLRequestMockHTTPJob::AddUrlHandler( 42 net::URLRequestMockHTTPJob::AddUrlHandlers(
43 path, content::BrowserThread::GetBlockingPool()); 43 path, content::BrowserThread::GetBlockingPool());
44 } 44 }
45 45
46 } 46 }
47 47
48 class PluginTest : public ContentBrowserTest { 48 class PluginTest : public ContentBrowserTest {
49 protected: 49 protected:
50 PluginTest() {} 50 PluginTest() {}
51 51
52 void SetUpCommandLine(base::CommandLine* command_line) override { 52 void SetUpCommandLine(base::CommandLine* command_line) override {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 ResourceDispatcherHostDelegate* old_delegate = 558 ResourceDispatcherHostDelegate* old_delegate =
559 ResourceDispatcherHostImpl::Get()->delegate(); 559 ResourceDispatcherHostImpl::Get()->delegate();
560 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); 560 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate);
561 LoadAndWait(url); 561 LoadAndWait(url);
562 test_delegate.WaitForPluginRequest(); 562 test_delegate.WaitForPluginRequest();
563 ASSERT_TRUE(test_delegate.found_cookie()); 563 ASSERT_TRUE(test_delegate.found_cookie());
564 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); 564 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate);
565 } 565 }
566 566
567 } // namespace content 567 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_browsertest.cc ('k') | net/test/url_request/url_request_mock_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698