Commit 8bf91a66 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Remove logging that exposes url in error output

Bug: 639322
Change-Id: I9443dab4aeaeef75e722bba8d3835f00406a3c65
Reviewed-on: https://chromium-review.googlesource.com/c/1481570
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636253}
parent 786f5369
...@@ -58,8 +58,7 @@ namespace extensions { ...@@ -58,8 +58,7 @@ namespace extensions {
namespace { namespace {
const char kCannotRequestAutomationOnPage[] = const char kCannotRequestAutomationOnPage[] =
"Cannot request automation tree on url \"*\". " "Failed request of automation on a page";
"Extension manifest must request permission to access this host.";
const char kRendererDestroyed[] = "The tab was closed."; const char kRendererDestroyed[] = "The tab was closed.";
const char kNoDocument[] = "No document."; const char kNoDocument[] = "No document.";
const char kNodeDestroyed[] = const char kNodeDestroyed[] =
...@@ -283,8 +282,7 @@ AutomationInternalEnableTabFunction::Run() { ...@@ -283,8 +282,7 @@ AutomationInternalEnableTabFunction::Run() {
return RespondNow(Error("Could not enable accessibility for active tab")); return RespondNow(Error("Could not enable accessibility for active tab"));
if (!CanRequestAutomation(extension(), automation_info, contents)) { if (!CanRequestAutomation(extension(), automation_info, contents)) {
return RespondNow( return RespondNow(Error(kCannotRequestAutomationOnPage));
Error(kCannotRequestAutomationOnPage, contents->GetURL().spec()));
} }
AutomationWebContentsObserver::CreateForWebContents(contents); AutomationWebContentsObserver::CreateForWebContents(contents);
...@@ -508,8 +506,7 @@ AutomationInternalPerformActionFunction::Run() { ...@@ -508,8 +506,7 @@ AutomationInternalPerformActionFunction::Run() {
content::WebContents* contents = content::WebContents* contents =
content::WebContents::FromRenderFrameHost(rfh); content::WebContents::FromRenderFrameHost(rfh);
if (!CanRequestAutomation(extension(), automation_info, contents)) { if (!CanRequestAutomation(extension(), automation_info, contents)) {
return RespondNow( return RespondNow(Error(kCannotRequestAutomationOnPage));
Error(kCannotRequestAutomationOnPage, contents->GetURL().spec()));
} }
// Handle internal actions. // Handle internal actions.
......
...@@ -100,8 +100,7 @@ chrome.webNavigation.onCompleted.addListener(function(details) { ...@@ -100,8 +100,7 @@ chrome.webNavigation.onCompleted.addListener(function(details) {
'respective host.')); 'respective host.'));
chrome.automation.getTree(callbackFail( chrome.automation.getTree(callbackFail(
'Cannot request automation tree on url "' + details.url + 'Failed request of automation on a page'));
'". Extension manifest must request permission to access this host.'));
assertFalse(canXhr(details.url)); assertFalse(canXhr(details.url));
}); });
......
...@@ -21,8 +21,8 @@ var allTestsADomain = [ ...@@ -21,8 +21,8 @@ var allTestsADomain = [
var allTestsBDomain = [ var allTestsBDomain = [
function testError() { function testError() {
var expectedError = 'Cannot request automation tree on url "' + urlB + var expectedError = 'Failed request of automation on a page';
'". Extension manifest must request permission to access this host.';
chrome.automation.getTree(callbackFail(expectedError, function(tree) { chrome.automation.getTree(callbackFail(expectedError, function(tree) {
assertEq(undefined, tree); assertEq(undefined, tree);
chrome.test.succeed(); chrome.test.succeed();
...@@ -46,4 +46,3 @@ chrome.test.getConfig(function(config) { ...@@ -46,4 +46,3 @@ chrome.test.getConfig(function(config) {
}); });
}); });
}); });
...@@ -21,8 +21,7 @@ var allTestsADomain = [ ...@@ -21,8 +21,7 @@ var allTestsADomain = [
var allTestsBDomain = [ var allTestsBDomain = [
function testError() { function testError() {
var expectedError = 'Cannot request automation tree on url "' + urlB + var expectedError = 'Failed request of automation on a page';
'". Extension manifest must request permission to access this host.';
chrome.automation.getTree(callbackFail(expectedError, function(tree) { chrome.automation.getTree(callbackFail(expectedError, function(tree) {
assertEq(undefined, tree); assertEq(undefined, tree);
chrome.test.succeed(); chrome.test.succeed();
...@@ -46,4 +45,3 @@ chrome.test.getConfig(function(config) { ...@@ -46,4 +45,3 @@ chrome.test.getConfig(function(config) {
}); });
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment