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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 131783012: Fix the handling of user gestures for external protocol handler dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary DCHECK Created 6 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 | Annotate | Revision Log
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 <deque> 5 #include <deque>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 // ExternalProtocolHandler::Delegate implementation. 965 // ExternalProtocolHandler::Delegate implementation.
966 virtual ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( 966 virtual ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker(
967 ShellIntegration::DefaultWebClientObserver* observer, 967 ShellIntegration::DefaultWebClientObserver* observer,
968 const std::string& protocol) OVERRIDE { 968 const std::string& protocol) OVERRIDE {
969 NOTREACHED(); 969 NOTREACHED();
970 // This will crash, but it shouldn't get this far with BlockState::BLOCK 970 // This will crash, but it shouldn't get this far with BlockState::BLOCK
971 // anyway. 971 // anyway.
972 return NULL; 972 return NULL;
973 } 973 }
974 virtual ExternalProtocolHandler::BlockState GetBlockState( 974 virtual ExternalProtocolHandler::BlockState GetBlockState(
975 const std::string& scheme) OVERRIDE { 975 const std::string& scheme,
976 bool initiated_by_user_gesture) OVERRIDE {
976 // Block everything and fail the test. 977 // Block everything and fail the test.
977 ADD_FAILURE(); 978 ADD_FAILURE();
978 return ExternalProtocolHandler::BLOCK; 979 return ExternalProtocolHandler::BLOCK;
979 } 980 }
980 virtual void BlockRequest() OVERRIDE { } 981 virtual void BlockRequest() OVERRIDE { }
981 virtual void RunExternalProtocolDialog(const GURL& url, 982 virtual void RunExternalProtocolDialog(const GURL& url,
982 int render_process_host_id, 983 int render_process_host_id,
983 int routing_id) OVERRIDE { 984 int routing_id) OVERRIDE {
984 NOTREACHED(); 985 NOTREACHED();
985 } 986 }
(...skipping 3187 matching lines...) Expand 10 before | Expand all | Expand 10 after
4173 } 4174 }
4174 }; 4175 };
4175 4176
4176 // Checks that prerendering works in incognito mode. 4177 // Checks that prerendering works in incognito mode.
4177 IN_PROC_BROWSER_TEST_F(PrerenderIncognitoBrowserTest, PrerenderIncognito) { 4178 IN_PROC_BROWSER_TEST_F(PrerenderIncognitoBrowserTest, PrerenderIncognito) {
4178 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); 4179 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1);
4179 NavigateToDestURL(); 4180 NavigateToDestURL();
4180 } 4181 }
4181 4182
4182 } // namespace prerender 4183 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698