New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 601144 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug-Regression



Sign in to add a comment

WebDriver set_window_size() fails in unstable channel

Project Member Reported by wychen@chromium.org, Apr 6 2016

Issue description

Version: ChromeDriver 2.21, Selenium 2.53.0, Chrome unstable channel 51.0.2693.2 dev (64-bit)

OS: Goobuntu 14.04

What steps will reproduce the problem?
(1) Download and install Selenium and ChromeDriver
(2) Download min.py from attachment
(3) Run this command:
PATH=$PATH:/path/to/dir/containing/chromedriver ./min.py

What is the expected output?
After running it, a new Chrome window should appear, and resizes.

What do you see instead?
It does resize, but prints error message:

selenium.common.exceptions.WebDriverException: Message: unknown error: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:".

JavaScript stack:
EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:".

    at executeAsyncScript (<anonymous>:321:5)
    at apply.height (<anonymous>:337:29)
    at callFunction (<anonymous>:229:33)
    at apply.height (<anonymous>:239:23)
    at <anonymous>:240:3
  (Session info: chrome=51.0.2700.0)
  (Driver info: chromedriver=2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3),platform=Linux 3.13.0-83-generic x86_64)


The error is still there when downgrading ChromeDriver to 2.15. It works if using beta channel (50.0.2661.66 beta (64-bit)).

 
min.py
413 bytes View Download
Labels: -Type-Bug -Pri-2 Pri-1 Type-Bug-Regression
I haven't been able to find a workaround yet. Bump up the priority.
All get_window_size(), get_window_position(), and set_window_position() have this issue.
This also affects save_screenshot().
Cc: samu...@chromium.org
Owner: kozyatinskiy@chromium.org
Status: Started (was: Untriaged)
Bisecting indicated that the regression occurred with crrev.com/381902.

This is partially fixed by crrev.com/385769 and I think crrev.com/385769 needs to be reverted. Aleksei is that correct?
Cc: kozyatinskiy@chromium.org
Owner: dgozman@chromium.org
We're in progress of fixing this.
Is there a way we can catch this regression in the test? Like chrome/test/chromedriver/test/run_py_tests.py?
We do have some tests in run_py_tests.py that can uncover this regression, but we also had a few other regressions, as well as infra issues, at the same time. Sorry for not catching it earlier :(
Cc: achuith@chromium.org pfeldman@chromium.org domlasko...@chromium.org dgozman@chromium.org
 Issue 601533  has been merged into this issue.
I've made a fix with tests to prevent future regressions from our side: https://codereview.chromium.org/1873533002/
Components: Platform>DevTools
Labels: -OS-Linux OS-All
Labels: ReleaseBlock-Beta
Brilliant! I've locally applied the patch and it worked. Thanks for your prompt fix!
Project Member

Comment 12 by bugdroid1@chromium.org, Apr 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dade0c6aaa5902990bd653c0239fbf855a7cb2e0

commit dade0c6aaa5902990bd653c0239fbf855a7cb2e0
Author: dgozman <dgozman@chromium.org>
Date: Fri Apr 08 03:05:22 2016

[DevTools] Force context creation when runtime is enabled.

BUG= 597820 , 601144 

Review URL: https://codereview.chromium.org/1873533002

Cr-Commit-Position: refs/heads/master@{#385960}

[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/content/renderer/devtools/devtools_agent.cc
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/content/renderer/devtools/devtools_agent.h
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/content/renderer/render_view_browsertest.cc
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/core/inspector/MainThreadDebugger.h
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.cpp
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.h
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.h
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.h
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/platform/v8_inspector/public/V8ContextInfo.h
[modify] https://crrev.com/dade0c6aaa5902990bd653c0239fbf855a7cb2e0/third_party/WebKit/Source/platform/v8_inspector/public/V8DebuggerClient.h

Status: Fixed (was: Started)
This one should be fixed. I've tested by running webdriver's test:
chrome/test/chromedriver/test/run_py_tests.py --chromedriver=out/Release/chromedriver --chrome=out/Release/chrome --filter=*.testWindowSize --log-path=chromedriver.log

Please verify from your end.
Status: Verified (was: Fixed)
Looks good on the chromium.chromedriver waterfall bots.

wychen@ is everything working on your end?
Project Member

Comment 15 by bugdroid1@chromium.org, Apr 8 2016

It works perfect! Thank you all for your great support!

Sign in to add a comment