|
|
Created:
6 years, 6 months ago by dgozman Modified:
6 years, 6 months ago CC:
chromium-reviews, darin-cc_chromium.org, jam Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionSupport ResizeSynchronously for device emulation in tests.
When device emulation is on, synchronous resize should go through emulator.
BUG=327641
Patch Set 1 #Patch Set 2 : Update view rects #Messages
Total messages: 10 (0 generated)
dglazkov@, pfeldman@, could you please take a look? avi@, I usually asked jochen@ to look at emulation stuff, but while he's out, could you please take a look as content owner?
You have my LGTM from a context standpoint, conditional on getting approval from the area experts.
I guess I am curious: why do we need to support this synchronous resize mode? It's something we only do in tests, and ideally should abolish altogether, right?
On 2014/06/10 15:36:52, dglazkov wrote: > I guess I am curious: why do we need to support this synchronous resize mode? > It's something we only do in tests, and ideally should abolish altogether, > right? This is for https://codereview.chromium.org/308003007/, which introduces a test where device emulation is turned on and window is resized. It would be nice to get rid of this, but as I understand, we cannot do async window resize in layout tests yet.
On 2014/06/10 at 15:48:30, dgozman wrote: > On 2014/06/10 15:36:52, dglazkov wrote: > > I guess I am curious: why do we need to support this synchronous resize mode? > > It's something we only do in tests, and ideally should abolish altogether, > > right? > > This is for https://codereview.chromium.org/308003007/, which introduces a test where device emulation is turned on and window is resized. > It would be nice to get rid of this, but as I understand, we cannot do async window resize in layout tests yet. We totally do have async window resize in layout tests! In fact, the only time it's not async is when we use the "unfortunate mode" setting. Now, there could be bugs that prevent you from accomplishing what's necessary for this scenario -- we should totally fix those. Help me understand the problem a bit better?
> We totally do have async window resize in layout tests! In fact, the only time > it's not async is when we use the "unfortunate mode" setting. Now, there could > be bugs that prevent you from accomplishing what's necessary for this scenario > -- we should totally fix those. Help me understand the problem a bit better? I've traced async resize when writing layout test, and it did nothing because the window is not a popup nor a panel. See https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/we.... Therefore, WebViewImpl was not resized, and test failed.
On 2014/06/10 at 15:59:07, dgozman wrote: > > We totally do have async window resize in layout tests! In fact, the only time > > it's not async is when we use the "unfortunate mode" setting. Now, there could > > be bugs that prevent you from accomplishing what's necessary for this scenario > > -- we should totally fix those. Help me understand the problem a bit better? > > I've traced async resize when writing layout test, and it did nothing because the window is not a popup nor a panel. See https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/we.... > Therefore, WebViewImpl was not resized, and test failed. Got it. Hacky idea first -- can we not turn this into a popup test? Use window.open to create the window and take it from there? Another question is why the resize doesn't work for anything other than popup or panel. Avi, do you happen to know?
On 2014/06/10 16:08:18, dglazkov wrote: > On 2014/06/10 at 15:59:07, dgozman wrote: > > > We totally do have async window resize in layout tests! In fact, the only > time > > > it's not async is when we use the "unfortunate mode" setting. Now, there > could > > > be bugs that prevent you from accomplishing what's necessary for this > scenario > > > -- we should totally fix those. Help me understand the problem a bit better? > > > > I've traced async resize when writing layout test, and it did nothing because > the window is not a popup nor a panel. See > https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/we.... > > Therefore, WebViewImpl was not resized, and test failed. > > Got it. Hacky idea first -- can we not turn this into a popup test? Use > window.open to create the window and take it from there? > > Another question is why the resize doesn't work for anything other than popup or > panel. Avi, do you happen to know? Sorry, no idea.
> Got it. Hacky idea first -- can we not turn this into a popup test? Use > window.open to create the window and take it from there? This may be doable, but it will probably be even more plumbing since we should attach inspector to this popup instead of original page, and that's done in webkit_test_runner.cc.
On 2014/06/10 at 16:10:38, avi wrote: > On 2014/06/10 16:08:18, dglazkov wrote: > > On 2014/06/10 at 15:59:07, dgozman wrote: > > > > We totally do have async window resize in layout tests! In fact, the only > > time > > > > it's not async is when we use the "unfortunate mode" setting. Now, there > > could > > > > be bugs that prevent you from accomplishing what's necessary for this > > scenario > > > > -- we should totally fix those. Help me understand the problem a bit better? > > > > > > I've traced async resize when writing layout test, and it did nothing because > > the window is not a popup nor a panel. See > > https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/we.... > > > Therefore, WebViewImpl was not resized, and test failed. > > > > Got it. Hacky idea first -- can we not turn this into a popup test? Use > > window.open to create the window and take it from there? > > > > Another question is why the resize doesn't work for anything other than popup or > > panel. Avi, do you happen to know? > > Sorry, no idea. Here's the answer: https://code.google.com/p/chromium/issues/detail?id=2091. Thus, the "right" solutions are: 1) Turn the test into creating a popup window and resizing it from there. 2) Expose testRunner.resize that emulates user resizing the window. |