|
|
Created:
6 years, 7 months ago by ostap Modified:
6 years, 7 months ago CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, jochen+watch_chromium.org, creis+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Visibility:
Public. |
DescriptionUse WebScreenInfo members to provide screen orientation information for layout test support.
BUG=162827
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271017
Patch Set 1 #Patch Set 2 : Typo fix #
Total comments: 2
Patch Set 3 : Fixed formatting. #
Total comments: 2
Patch Set 4 : Added FIXME #Patch Set 5 : Rebased patch. #Patch Set 6 : Rebased patch. #
Messages
Total messages: 84 (0 generated)
This change is needed before I can update the Blink-side to rely on WebScreenInfo::orientationType (instead of Platform.h API): https://codereview.chromium.org/277413002/
lgtm https://codereview.chromium.org/284583003/diff/10001/content/public/test/layo... File content/public/test/layouttest_support.h (right): https://codereview.chromium.org/284583003/diff/10001/content/public/test/layo... content/public/test/layouttest_support.h:64: const blink::WebScreenOrientationType& orientation); please clang-format
https://codereview.chromium.org/284583003/diff/10001/content/public/test/layo... File content/public/test/layouttest_support.h (right): https://codereview.chromium.org/284583003/diff/10001/content/public/test/layo... content/public/test/layouttest_support.h:64: const blink::WebScreenOrientationType& orientation); On 2014/05/14 09:07:35, jochen wrote: > please clang-format Done.
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/7...) android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/18...) ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/bui...) ios_rel_device on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_rel_device/builds...) linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/bui...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...) linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/30001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chrome...) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/bu...)
https://codereview.chromium.org/284583003/diff/30001/content/renderer/render_... File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/284583003/diff/30001/content/renderer/render_... content/renderer/render_view_impl.cc:4017: params.screen_info.orientationAngle = 90; Please, do not do that kind of assumptions. It seems easier to simply pass a pair of { type, angle }.
https://codereview.chromium.org/284583003/diff/30001/content/renderer/render_... File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/284583003/diff/30001/content/renderer/render_... content/renderer/render_view_impl.cc:4017: params.screen_info.orientationAngle = 90; On 2014/05/15 07:06:59, Mounir Lamouri wrote: > Please, do not do that kind of assumptions. It seems easier to simply pass a > pair of { type, angle }. I agree we generally shouldn't make this kind of assumption. However, this method is used *only* for layout testing. Why is this a problem for testing? The layout tests already assume that the default orientation is "portrait-primary" for e.g.
On 2014/05/15 13:01:46, Chris Dumez wrote: > I agree we generally shouldn't make this kind of assumption. However, this > method is used *only* for layout testing. Why is this a problem for testing? The > layout tests already assume that the default orientation is "portrait-primary" > for e.g. I understand that we can make some assumptions when testing but in that case, the method will prevent us from testing some things. For example, if Blink receives a WebScreenInfo with { 'undefined', 90 }, it should try to guess the actual orientation type. With this test, you are making the type mandatory and guess the angle based on it so you couldn't actually test that code path.
On 2014/05/15 13:34:27, Mounir Lamouri wrote: > On 2014/05/15 13:01:46, Chris Dumez wrote: > > I agree we generally shouldn't make this kind of assumption. However, this > > method is used *only* for layout testing. Why is this a problem for testing? > The > > layout tests already assume that the default orientation is "portrait-primary" > > for e.g. > > I understand that we can make some assumptions when testing but in that case, > the method will prevent us from testing some things. For example, if Blink > receives a WebScreenInfo with { 'undefined', 90 }, it should try to guess the > actual orientation type. With this test, you are making the type mandatory and > guess the angle based on it so you couldn't actually test that code path. Actually, if you look at my Blink-side patch, you will see that I explicitly disable orientationType detection when running layout tests. We don't want the layout tests to have different results depending on the hardware they run on (e.g. screen dimensions).
On 2014/05/15 13:37:44, Chris Dumez wrote: > On 2014/05/15 13:34:27, Mounir Lamouri wrote: > > On 2014/05/15 13:01:46, Chris Dumez wrote: > > > I agree we generally shouldn't make this kind of assumption. However, this > > > method is used *only* for layout testing. Why is this a problem for testing? > > The > > > layout tests already assume that the default orientation is > "portrait-primary" > > > for e.g. > > > > I understand that we can make some assumptions when testing but in that case, > > the method will prevent us from testing some things. For example, if Blink > > receives a WebScreenInfo with { 'undefined', 90 }, it should try to guess the > > actual orientation type. With this test, you are making the type mandatory and > > guess the angle based on it so you couldn't actually test that code path. > > Actually, if you look at my Blink-side patch, you will see that I explicitly > disable orientationType detection when running layout tests. We don't want the > layout tests to have different results depending on the hardware they run on > (e.g. screen dimensions). Couldn't we simulate a screen dimension? It sounds unfortunate to not test that part. Unless we use unit tests for it?
On 2014/05/15 13:34:27, Mounir Lamouri wrote: > On 2014/05/15 13:01:46, Chris Dumez wrote: > > I agree we generally shouldn't make this kind of assumption. However, this > > method is used *only* for layout testing. Why is this a problem for testing? > The > > layout tests already assume that the default orientation is "portrait-primary" > > for e.g. > > I understand that we can make some assumptions when testing but in that case, > the method will prevent us from testing some things. For example, if Blink > receives a WebScreenInfo with { 'undefined', 90 }, it should try to guess the > actual orientation type. With this test, you are making the type mandatory and > guess the angle based on it so you couldn't actually test that code path. Now that I re-read your comment, I realize I don't understand it. This method is only called when the layout test is explicitly calling setMockScreenOrientationForTesting("something"). Therefore, we want to set orientationType to the value that is given. So orientationType will not be undefined in this function. The only reason ostap had to set the orientationAngle to match the orientationType is because the Blink side was not notified of the orientation change otherwise.
On 2014/05/15 13:49:03, Chris Dumez wrote: > Now that I re-read your comment, I realize I don't understand it. This method is > only called when the layout test is explicitly calling > setMockScreenOrientationForTesting("something"). Therefore, we want to set > orientationType to the value that is given. So orientationType will not be > undefined in this function. The only reason ostap had to set the > orientationAngle to match the orientationType is because the Blink side was not > notified of the orientation change otherwise. testRunner.setMockScreenOrientation() is used to pretend that a screen orientation change happened, right? Why can't we specify the new { type, angle } tuple instead of just the type? I understand that we currently only get the type but it seems that there is a case for adding the angle here. Or am I missing something?
On 2014/05/15 15:43:19, Mounir Lamouri wrote: > On 2014/05/15 13:49:03, Chris Dumez wrote: > > Now that I re-read your comment, I realize I don't understand it. This method > is > > only called when the layout test is explicitly calling > > setMockScreenOrientationForTesting("something"). Therefore, we want to set > > orientationType to the value that is given. So orientationType will not be > > undefined in this function. The only reason ostap had to set the > > orientationAngle to match the orientationType is because the Blink side was > not > > notified of the orientation change otherwise. > > testRunner.setMockScreenOrientation() is used to pretend that a screen > orientation change happened, right? Why can't we specify the new { type, angle } > tuple instead of just the type? I understand that we currently only get the type > but it seems that there is a case for adding the angle here. Or am I missing > something? Oh, I did not get that you were proposing to extend setMockScreenOrientation(). Why not but I don't think this is high priority considering we currently don't expose the angle, only the type (this part of the spec is not implemented and apparently still unstable). I think this could be added later on. I don't think we should hold this CL because of this, it currently does what we need and it does not prevent later improvements. Would you agree?
On 2014/05/15 15:46:30, Chris Dumez wrote: > Oh, I did not get that you were proposing to extend setMockScreenOrientation(). > Why not but I don't think this is high priority considering we currently don't > expose the angle, only the type (this part of the spec is not implemented and > apparently still unstable). I think this could be added later on. I don't think > we should hold this CL because of this, it currently does what we need and it > does not prevent later improvements. Would you agree? Fine by me. As long as we agree on the solution, I have no problem to have this landed to unblock you. osap@, could you add a FIXME/TODO comment explaining that the type/angle relationship is temporary. LGTM with that.
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/50001
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/70001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/70001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for @master/content/public/test/layouttest_support.h: While running svn add @master --force --config-dir /b/infra_internal/commit_queue/subversion_config --non-interactive; svn: '@master' is just a peg revision. Maybe try '@master@' instead? Patch: @master/content/public/test/layouttest_support.h Index: content/public/test/layouttest_support.h diff --git @master/content/public/test/layouttest_support.h @master/content/public/test/layouttest_support.h index e2fb2e2ad32634c73ea63b96ab2921607d3c3dcd..ce4a66351425101ca13707c357dbb10d858cd103 100644 --- a/@master/content/public/test/layouttest_support.h +++ b/@master/content/public/test/layouttest_support.h @@ -61,6 +61,7 @@ void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); // Sets WebScreenOrientationType that should be used as a mock orientation. void SetMockScreenOrientation( + RenderView* render_view, const blink::WebScreenOrientationType& orientation); // Resets the mock screen orientation data.
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/90001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for @master/content/public/test/layouttest_support.h: While running svn add @master --force --config-dir /b/infra_internal/commit_queue/subversion_config --non-interactive; svn: '@master' is just a peg revision. Maybe try '@master@' instead? Patch: @master/content/public/test/layouttest_support.h Index: content/public/test/layouttest_support.h diff --git @master/content/public/test/layouttest_support.h @master/content/public/test/layouttest_support.h index e2fb2e2ad32634c73ea63b96ab2921607d3c3dcd..ce4a66351425101ca13707c357dbb10d858cd103 100644 --- a/@master/content/public/test/layouttest_support.h +++ b/@master/content/public/test/layouttest_support.h @@ -61,6 +61,7 @@ void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); // Sets WebScreenOrientationType that should be used as a mock orientation. void SetMockScreenOrientation( + RenderView* render_view, const blink::WebScreenOrientationType& orientation); // Resets the mock screen orientation data.
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/90001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for @master/content/public/test/layouttest_support.h: While running svn add @master --force --config-dir /b/infra_internal/commit_queue/subversion_config --non-interactive; svn: '@master' is just a peg revision. Maybe try '@master@' instead? Patch: @master/content/public/test/layouttest_support.h Index: content/public/test/layouttest_support.h diff --git @master/content/public/test/layouttest_support.h @master/content/public/test/layouttest_support.h index e2fb2e2ad32634c73ea63b96ab2921607d3c3dcd..ce4a66351425101ca13707c357dbb10d858cd103 100644 --- a/@master/content/public/test/layouttest_support.h +++ b/@master/content/public/test/layouttest_support.h @@ -61,6 +61,7 @@ void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); // Sets WebScreenOrientationType that should be used as a mock orientation. void SetMockScreenOrientation( + RenderView* render_view, const blink::WebScreenOrientationType& orientation); // Resets the mock screen orientation data.
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/90001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for @master/content/public/test/layouttest_support.h: While running svn add @master --force --config-dir /b/infra_internal/commit_queue/subversion_config --non-interactive; svn: '@master' is just a peg revision. Maybe try '@master@' instead? Patch: @master/content/public/test/layouttest_support.h Index: content/public/test/layouttest_support.h diff --git @master/content/public/test/layouttest_support.h @master/content/public/test/layouttest_support.h index e2fb2e2ad32634c73ea63b96ab2921607d3c3dcd..ce4a66351425101ca13707c357dbb10d858cd103 100644 --- a/@master/content/public/test/layouttest_support.h +++ b/@master/content/public/test/layouttest_support.h @@ -61,6 +61,7 @@ void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); // Sets WebScreenOrientationType that should be used as a mock orientation. void SetMockScreenOrientation( + RenderView* render_view, const blink::WebScreenOrientationType& orientation); // Resets the mock screen orientation data.
The CQ bit was checked by sl.ostapenko@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/284583003/90001
Message was sent while issue was closed.
Change committed as 271017 |