Bug 96920

Summary: [EFL] min-device-width failures in media tests
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit EFLAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: alexander.shalamov, gyuyoung.kim, kenneth, lucas.de.marchi, rakuco, ryuan.choi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
kenneth: review+
Patch for landing none

Description Chris Dumez 2012-09-17 07:48:47 PDT
The following test cases fail on the bots:
 fast/media/invalid-lengths.html
 fast/media/matchmedium-query-api.html
 fast/media/media-query-list-01.html

The diffs look like:
-PASS: "(min-device-width: 1px)" evaluates to true.
+FAIL: "(min-device-width: 1px)" evaluates to false.

-"(min-device-width: 100px)" evaluates to true: PASS
+"(min-device-width: 100px)" evaluates to false: FAIL

-"(min-device-width: 100px)" evaluates to true: PASS
+"(min-device-width: 100px)" evaluates to false: FAIL
Comment 1 Chris Dumez 2012-09-17 10:35:05 PDT
They fail on the bot because it does not run X. screenRect() in platform/efl returns O width and height in that case.
Comment 2 Chris Dumez 2012-09-17 10:49:52 PDT
media/video-source-media.html fails for the same reason
Comment 3 Chris Dumez 2012-09-17 10:50:01 PDT
*** Bug 96922 has been marked as a duplicate of this bug. ***
Comment 4 Chris Dumez 2012-09-17 11:55:47 PDT
Created attachment 164431 [details]
Patch
Comment 5 Kenneth Rohde Christiansen 2012-09-18 04:11:02 PDT
Comment on attachment 164431 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164431&action=review

> Source/WebCore/platform/efl/PlatformScreenEfl.cpp:117
> +    int width = 800, height = 600;

I think a comment is valid here. also it should be two lines
Comment 6 Chris Dumez 2012-09-18 05:02:21 PDT
Created attachment 164534 [details]
Patch for landing

Take Kenneth's feedback into consideration.

Could someone please cq+?
Comment 7 Raphael Kubo da Costa (:rakuco) 2012-09-18 05:32:35 PDT
Comment on attachment 164431 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164431&action=review

>> Source/WebCore/platform/efl/PlatformScreenEfl.cpp:117
>> +    int width = 800, height = 600;
> 
> I think a comment is valid here. also it should be two lines

Does it work only because the dimensions match the ones used in DRT/WTR?
Comment 8 Chris Dumez 2012-09-18 05:35:19 PDT
(In reply to comment #7)
> (From update of attachment 164431 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=164431&action=review
> 
> >> Source/WebCore/platform/efl/PlatformScreenEfl.cpp:117
> >> +    int width = 800, height = 600;
> > 
> > I think a comment is valid here. also it should be two lines
> 
> Does it work only because the dimensions match the ones used in DRT/WTR?

No, any realistic screen size would make those tests pass. Currently we return 0x0 which of course is unrealistic. Tests usually checks something like "width > 100px".
Comment 9 Raphael Kubo da Costa (:rakuco) 2012-09-18 05:47:17 PDT
Comment on attachment 164534 [details]
Patch for landing

Right.
Comment 10 WebKit Review Bot 2012-09-18 05:54:40 PDT
Comment on attachment 164534 [details]
Patch for landing

Clearing flags on attachment: 164534

Committed r128880: <http://trac.webkit.org/changeset/128880>
Comment 11 WebKit Review Bot 2012-09-18 05:54:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Raphael Kubo da Costa (:rakuco) 2012-09-18 07:45:02 PDT
For the record, the fast/dom/Window tests still fail here and on the bots, so I have skipped them again in <http://trac.webkit.org/changeset/128893>.