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

Side by Side Diff: components/test_runner/web_frame_test_client.cc

Issue 2012653004: content_shell: Fix a regression for paths starting with /media/. (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 "components/test_runner/web_frame_test_client.h" 5 #include "components/test_runner/web_frame_test_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 !main_document_url.SchemeIs(url::kHttpsScheme)) || 591 !main_document_url.SchemeIs(url::kHttpsScheme)) ||
592 IsLocalHost(main_document_url.host())) && 592 IsLocalHost(main_document_url.host())) &&
593 !delegate_->AllowExternalPages()) { 593 !delegate_->AllowExternalPages()) {
594 delegate_->PrintMessage(std::string("Blocked access to external URL ") + 594 delegate_->PrintMessage(std::string("Blocked access to external URL ") +
595 request_url + "\n"); 595 request_url + "\n");
596 BlockRequest(request); 596 BlockRequest(request);
597 return; 597 return;
598 } 598 }
599 } 599 }
600 600
601 if (!test_runner_->did_request_after_reset()) {
602 test_runner_->set_did_request_after_reset();
603 return;
604 }
601 // Set the new substituted URL. 605 // Set the new substituted URL.
602 request.setURL( 606 request.setURL(
603 delegate_->RewriteLayoutTestsURL(request.url().string().utf8())); 607 delegate_->RewriteLayoutTestsURL(request.url().string().utf8()));
604 } 608 }
605 609
606 void WebFrameTestClient::didReceiveResponse( 610 void WebFrameTestClient::didReceiveResponse(
607 unsigned identifier, 611 unsigned identifier,
608 const blink::WebURLResponse& response) { 612 const blink::WebURLResponse& response) {
609 if (test_runner_->shouldDumpResourceLoadCallbacks()) { 613 if (test_runner_->shouldDumpResourceLoadCallbacks()) {
610 if (resource_identifier_map_.find(identifier) == 614 if (resource_identifier_map_.find(identifier) ==
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 else 749 else
746 callback->onError(blink::WebSetSinkIdError::NotFound); 750 callback->onError(blink::WebSetSinkIdError::NotFound);
747 } 751 }
748 752
749 void WebFrameTestClient::didClearWindowObject(blink::WebLocalFrame* frame) { 753 void WebFrameTestClient::didClearWindowObject(blink::WebLocalFrame* frame) {
750 web_test_proxy_base_->test_interfaces()->BindTo(frame); 754 web_test_proxy_base_->test_interfaces()->BindTo(frame);
751 web_test_proxy_base_->BindTo(frame); 755 web_test_proxy_base_->BindTo(frame);
752 } 756 }
753 757
754 } // namespace test_runner 758 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698