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

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

Issue 24086003: [chromedriver] Don't overwrite extension snapshot. (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 | « no previous file | 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 c1971098c77cc7fd8c20ddc3a9ee3395ccae2185..997290e842edec00b49861ae58435d400c4ee5e0 100644
--- a/chrome/test/chromedriver/window_commands.cc
+++ b/chrome/test/chromedriver/window_commands.cc
@@ -739,16 +739,16 @@ Status ExecuteScreenshot(
if (session->chrome->GetType() == Chrome::DESKTOP &&
!session->force_devtools_screenshot) {
AutomationExtension* extension = NULL;
- Status status = session->chrome->GetAutomationExtension(&extension);
+ status = session->chrome->GetAutomationExtension(&extension);
if (status.IsError())
return status;
status = extension->CaptureScreenshot(&screenshot);
// If the screenshot was forbidden, fallback to DevTools.
- if (status.code() != kForbidden)
- return status;
+ if (status.code() == kForbidden)
+ status = web_view->CaptureScreenshot(&screenshot);
+ } else {
+ status = web_view->CaptureScreenshot(&screenshot);
}
-
- status = web_view->CaptureScreenshot(&screenshot);
if (status.IsError())
return status;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698