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

Unified Diff: chrome/test/chromedriver/window_commands.cc

Issue 23542015: [chromedriver] Fallback to devtools for screenshotting of forbidden urls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/chromedriver/extension/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/window_commands.cc
diff --git a/chrome/test/chromedriver/window_commands.cc b/chrome/test/chromedriver/window_commands.cc
index cf376da0af1055c275c3b4d60fdad2b33a8c5d28..d9a666d2c2731d10bee09252e7e084eab5b0c3fe 100644
--- a/chrome/test/chromedriver/window_commands.cc
+++ b/chrome/test/chromedriver/window_commands.cc
@@ -743,13 +743,14 @@ Status ExecuteScreenshot(
if (status.IsError())
return status;
status = extension->CaptureScreenshot(&screenshot);
- if (status.IsError())
- return status;
- } else {
- Status status = web_view->CaptureScreenshot(&screenshot);
- if (status.IsError())
+ if (status.code() != kForbidden)
chrisgao (Use stgao instead) 2013/09/09 22:56:04 How about adding a comment for the special case?
kkania 2013/09/11 18:24:21 Done.
return status;
}
+
+ status = web_view->CaptureScreenshot(&screenshot);
+ if (status.IsError())
+ return status;
+
value->reset(new base::StringValue(screenshot));
return Status(kOk);
}
« no previous file with comments | « chrome/test/chromedriver/extension/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698