In <scr003.html> and <scr004.html> JavaScript Testcase(s): Screen.Width and Screen.Height are not checked for 1400x1050 resolution

RESOLVED FIXED

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
16 years ago
15 years ago

People

(Reporter: Andreas Schrattenecker, Assigned: Prashant Desale)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2)
Gecko/20020510
BuildID:    2002051006 mozilla 1.0RC2 

The Testcase provided in Debug->Verification->JavaScript 
http://mozilla.org/quality/ngdriver/suites/javascript/scr004.html
does fail with following results:
Screen.Height true failedBug report required false true




Reproducible: Always
Steps to Reproduce:
1.go to specified URL


Actual Results:  test does fail

Expected Results:  test should pass

using Windows 2000, SP2, on DELL Inspiron 8000, Nvidia Geforce2 Go 
Screen Resolution is 1400x1050
(Reporter)

Comment 1

16 years ago
does also fail with 
Windows 2000, SP2, Mozilla 1.0.0+ 2002051104, same machine
(Reporter)

Comment 2

16 years ago
does also fail with:
Linux, SuSE 8.0, mozilla 1.0RC1, 2002041711 same machine and resolution 

changed OS to All
OS: Windows 2000 → All
(Reporter)

Comment 3

16 years ago
test passes when i set my screen resolution to 1280x1024,
so it must be the uncommon 1400x1050 resolution

changed summary
Summary: Javascript Screen.Height testcase failed → Javascript Screen.Height testcase failed with 1400x1050 resolution
(Reporter)

Comment 4

16 years ago
Screen.Width does also fail
http://mozilla.org/quality/ngdriver/suites/javascript/scr003.html

changed summary
Summary: Javascript Screen.Height testcase failed with 1400x1050 resolution → Javascript Screen.Height & Width testcase failed on 1400x1050 resolution
(Reporter)

Comment 5

16 years ago
testcase also doesnt work in IE

Comment 6

16 years ago
Reassigning to DOM Level 0 and to Prashant. There have been a number
of bugs like this lately; I believe the users are running the testcase
without using the test driver HTML page. 

The testcase mentioned above, like the others, uses |window.opener|,
so it cannot be run as a standalone.

Prashant, is that right? 

Assignee: rogerl → desale
Component: JavaScript Engine → DOM Level 0
QA Contact: pschwartau → desale

Comment 7

16 years ago
Oops, I missed Comment #3 -

> Test passes when I set my screen resolution to 1280x1024,
> so it must be the uncommon 1400x1050 resolution

This shows it's not the |window.opener| problem this time.
The script of the testcase includes these lines:


aTestcases[tc++] = new Testcase(sFilename,
                               "Screen.Height true",
                               true,
                               checkresult(screen.height),

etc., where we find:

function checkresult(text)
{
  if(parseInt(text)==480 || parseInt(text)==600 || parseInt(text)==768 || 
  parseInt(text)==864 || parseInt(text)==1024 || parseInt(text)==624 || 
  parseInt(text)==1200 || parseInt(text)==1440 || parseInt(text)==960 || 
  parseInt(text)==870)
  {
      return true;
  }
  else
  {
      return false;
  }       
}


This means only the hard-coded values above will pass the test
for screen.height. That's the explanation, as Andreas is using
a screen.height of 1050 instead -

As Andreas points out, this applies to the screen.width test, too.
In summary, both

  http://mozilla.org/quality/ngdriver/suites/javascript/scr003.html
  http://mozilla.org/quality/ngdriver/suites/javascript/scr004.html

have hard-coded values. If there is no other way, perhaps the 
tests could include a warning to the user about this... ? 
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 8

15 years ago
--> marking blocker of 142649 (testcase might need to be updated)

Updated

15 years ago
Blocks: 142649
Hardware: PC → All
Summary: Javascript Screen.Height & Width testcase failed on 1400x1050 resolution → In <scr003.html> and <scr004.html> JavaScript Testcase(s): Screen.Width and Screen.Height are not checked for 1400x1050 resolution

Comment 9

15 years ago
I added the 1050x1400 resolution to those two tests. Marking FIXED.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.