Commit caa5c484 authored by skyostil's avatar skyostil Committed by Commit bot

headless: Allow both WW,HH and WWxHH forms for specifying window size

As Chrome only supports the former format, change the documentation to
refer to that.

BUG=678539

Review-Url: https://codereview.chromium.org/2622773003
Cr-Commit-Position: refs/heads/master@{#442609}
parent 2465bc70
......@@ -45,7 +45,7 @@ const char kDefaultScreenshotFileName[] = "screenshot.png";
bool ParseWindowSize(std::string window_size, gfx::Size* parsed_window_size) {
int width, height = 0;
if (sscanf(window_size.c_str(), "%dx%d", &width, &height) >= 2 &&
if (sscanf(window_size.c_str(), "%d%*[x,]%d", &width, &height) >= 2 &&
width >= 0 && height >= 0) {
parsed_window_size->set_width(width);
parsed_window_size->set_height(height);
......
......@@ -54,7 +54,7 @@ const char kUserDataDir[] = "user-data-dir";
// specified virtual time budget is exhausted.
const char kVirtualTimeBudget[] = "virtual-time-budget";
// Sets the initial window size. Provided as string in the format "800x600".
// Sets the initial window size. Provided as string in the format "800,600".
const char kWindowSize[] = "window-size";
} // namespace switches
......
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