[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java needs upd
From:       Shashidhara Veerabhadraiah <shashidhara.veerabhadraiah () oracle ! com>
Date:       2017-07-18 9:55:21
Message-ID: 9e0e9fa1-6db7-49b2-aa28-5b5a15b7bafb () default
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Phil, Please see below for my responses:

  

New Webrev with fixes @

<http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev.07/>

  

Thanks and regards,
Shashi

  

From: Philip Race 
Sent: Sunday, July 9, 2017 11:58 PM
To: Shashidhara Veerabhadraiah <shashidhara.veerabhadraiah@oracle.com>
Cc: Prasanta Sadhukhan <prasanta.sadhukhan@oracle.com>; 2d-dev@openjdk.java.net
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

displays is misspelt as diplsays in at least two cases.[Shashi] Fixed
imageable is misspelt as imagable in at least one case.[Shashi] Fixed

"imageable area retains even after closing in the"
  

Are you trying to say "is retained" ?

[Shashi] Paper size – margin values = new imageable area. So by setting new margin \
values and closing dialog and when reopened we have the same margin values. But the \
problem is that we don't have any api's to set the margin values but instead we have \
api for setting a new imageable area. Since we are calling setImageableArea(), the \
same is mentioned in the instructions box, to indicate that we have called that api \
and would be expecting the same to be retained back when we open up the printer \
dialog. Please let me know if this needs any changes.



I am still not happy that you are hard-coding values "2" and "3" in the instructions
If the printer's default paper is < 6 inches wide this will fail.

The whole thing should be adaptive to what it actually sees.

[Shashi] The test calls setSize() for the paper object to have a standard size. This \
function takes the input in parts of 1/72 of an "inch". Since a standard size has \
been set, the undersize fail won't happen.

But without calling setSize() and if we try to make it adaptive then the instructions \
would need to be dynamic and in which case we may fail in certain cases like the one \
you mentioned earlier, being ending up with negative values for the imageable area. \
But this problem won't be there if we set the values explicitly to a proper size and \
continue the testing from there. By doing this the intent of the test is not breached \
I believe. Please let me know if you think otherwise.



I am also unclear how you are so sure it'll be inches ?

[Shashi] Paper class has setSize() which takes the input as parts of 1/72th of an \
"inch". So the backend is always in this ‘parts' unit of an "inch". But the printer \
dialog adapts per the respective locale and changes the values per the selected unit \
appropriately and proportionately on the dialog.


I'd expect most locales to use centimetres, but what you see depends
on the platform .. which I expect is why you excluded Mac ?
But why are you excluding Solaris too ? [Shashi] Modified test to include Solaris \
target too. Tested on Solaris 11.3 VM.

java.awt.print.PrinterJob.getPrinterJob()
  

You are importing all the other classes from java.awt.print,
so why not this one too ?

[Shashi] Modified test to include this static method import.

Whilst I don't have any objection to throwing a runtime exception
if the tester presses your FAIL button, you could have just used
the "yes/no" support in the jtreg test harness.

-phil.


On 6/21/17, 1:33 AM, Shashidhara Veerabhadraiah wrote: 

Hi, Here is the updated Webrev with comment fixes:

  

HYPERLINK "http://cr.openjdk.java.net/%7Epkbalakr/shashi/6949753/webrev_06/"http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev_06/


  

Thanks and regards,

Shashi

  

From: Shashidhara Veerabhadraiah 
Sent: Monday, June 12, 2017 11:19 PM
To: Philip Race HYPERLINK "mailto:philip.race@oracle.com"<philip.race@oracle.com>; \
Prasanta Sadhukhan HYPERLINK \
                "mailto:prasanta.sadhukhan@oracle.com"<prasanta.sadhukhan@oracle.com>
Cc: HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Subject: RE: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

Ok Phil. I shall update the test and send it for re-review tomorrow.

  

Thanks and regards,
Shashi

  

From: Phil Race 
Sent: Monday, June 12, 2017 11:15 PM
To: Shashidhara Veerabhadraiah <HYPERLINK \
"mailto:shashidhara.veerabhadraiah@oracle.com"shashidhara.veerabhadraiah@oracle.com>; \
Prasanta Sadhukhan <HYPERLINK \
                "mailto:prasanta.sadhukhan@oracle.com"prasanta.sadhukhan@oracle.com>
Cc: HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

The dialog does not show "Letter" because you said so. It shows it because the \
printer reports it supports letter.

-phil.

On 06/12/2017 10:44 AM, Shashidhara Veerabhadraiah wrote:

Just to clarify Phil for the part of cross platform print dialog, here is that dialog \
representation:

  



  

Since this dialog can appear on any platform, the Paper class would represent the \
backend object for the front end dialog properties(of a generic printer) as shown in \
the pic above. Hence the use of the raw Paper object than obtaining it from the page \
format.

At the same time, as you pointed out, the test is not reliable with the actual \
conditions. The only problem I see is that the moment we change the test case to stay \
close to the actual scenario we may have certain failures because the settings are \
different for different locales and it may be difficult to adapt to every possible \
locales.

  

Thanks and regards,

Shashi   

  

From: Phil Race 
Sent: Monday, June 12, 2017 10:01 PM
To: Shashidhara Veerabhadraiah HYPERLINK \
"mailto:shashidhara.veerabhadraiah@oracle.com"<shashidhara.veerabhadraiah@oracle.com>; \
Prasanta Sadhukhan HYPERLINK \
                "mailto:prasanta.sadhukhan@oracle.com"<prasanta.sadhukhan@oracle.com>
Cc: HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

> [Shashi] Yes. I intend to use the default paper object as this is a test related to \
> the cross platform default printer dialog. In the modified test file, I have set \
> the size of the physical paper instead of relying it on the default setting which \
> may vary as you pointed out, depending on the locale.
> Now that we have our own paper object(with a constant paper size) and based on the \
> margin setting(which are const it won't cause an undesirable behavior like going \
> into negative space.
  
  
Sorry, that is not a valid thing to do. The print dialog is free to ignore this
or workaround the incompatibility of that paper with the supported media so your test \
is not reliable. And I don't see what the cross platform print dialog has to do with \
it. It is, or should be, just as aware of the printer sizes as the native one.
  
-phil.

  

On 06/12/2017 03:34 AM, Shashidhara Veerabhadraiah wrote:

Hi Phil, Please see below for the comments:

  

The updated Webrev is at:

HYPERLINK "http://cr.openjdk.java.net/%7Eaghaisas/shashi/6949753/webrev_05/"http://cr.openjdk.java.net/~aghaisas/shashi/6949753/webrev_05/



Modified in what way from the previous version ?

-phil.





  

Thanks and regards,
Shashi

  

From: Phil Race 
Sent: Saturday, June 10, 2017 3:07 AM
To: Prasanta Sadhukhan HYPERLINK \
"mailto:prasanta.sadhukhan@oracle.com"<prasanta.sadhukhan@oracle.com>; Shashidhara \
Veerabhadraiah HYPERLINK \
                "mailto:shashidhara.veerabhadraiah@oracle.com"<shashidhara.veerabhadraiah@oracle.com>
                
Cc: HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

private static void setValuesForPrintPageSetup(PageFormat pageFormat,   int
 118                         marginValue) throws PrinterException {
 119                 Paper paper = new Paper();
 double paperHeight = paper.getHeight();
 122                 double paperWidth = paper.getWidth();
 123                 double paperX = paper.getImageableX();
 124                 double paperY = paper.getImageableY();
 125                 paper.setImageableArea(paperX * marginValue, paperY * \
marginValue,  126                                 paperWidth - (paperX * 2 * \
marginValue),  127                                 paperHeight - (paperY * 2 * \
marginValue));  
  
 105                 setValuesForPrintPageSetup(pageFormat, 3);
  
  
I see you call new Paper() above
https://docs.oracle.com/javase/8/docs/api/java/awt/print/Paper.html#Paper--
  
Did you really intend to use a default paper instead of getting the one
from the pageFormat ? On some label printer your Letter Paper may not
even be supported. US (aka NA) Letter is 8.5" wide.
  
Also although it probably will work out OK the maths isn't checking
for boundary problems.
  
default margin will be 1" so that's what you'll get for paperX and paperY
  
Using your value of 3 we set the imagable area such that
imageable X = 1 * 3 = 3
imageableWidth = 8.5 - (1 * 2 *3) = 8.5 - 6 = 2.5;
  
Fortunately that worked out positive .. but it does not seem to be enforced.
  
If we'd used 5 it would be a different story : 
  
ix = 5, iw = 8.5 - ( 1 * 2 * 5) = -1.5
  
The implementation will (should) clamp it to non-negative but it
might still be better to have some defensive logic of your own.
[Shashi] Yes. I intend to use the default paper object as this is a test related to \
the cross platform default printer dialog. In the modified test file, I have set the \
size of the physical paper instead of relying it on the default setting which may \
vary as you pointed out, depending on the locale. Now that we have our own paper \
object(with a constant paper size) and based on the margin setting(which are \
constants), it won't cause an undesirable behavior like going into negative space.  
nit: there's a missing space here
  
 75                                 } catch(PrinterException e) {
[Shashi] This is fixed now.
  
-phil.
  

On 06/09/2017 03:27 AM, Prasanta Sadhukhan wrote:

looks good to me.

Regards
Prasanta

On 6/9/2017 3:49 PM, Shashidhara Veerabhadraiah wrote:

Hi All, Please find the updated Webrev with fixes for the comments @ HYPERLINK \
"http://cr.openjdk.java.net/%7Epkbalakr/shashi/6949753/webrev_04/"http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev_04/


  

Thanks and regards,
Shashi

  

From: Philip Race 
Sent: Thursday, June 8, 2017 3:32 AM
To: Prasanta Sadhukhan HYPERLINK \
                "mailto:prasanta.sadhukhan@oracle.com"<prasanta.sadhukhan@oracle.com>
Cc: Shashidhara Veerabhadraiah HYPERLINK \
"mailto:shashidhara.veerabhadraiah@oracle.com"<shashidhara.veerabhadraiah@oracle.com>; \
                HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

.. and please make sure all lines are <= 80 chars as per the coding standards.

-phil.

On 6/6/17, 11:59 PM, Prasanta Sadhukhan wrote: 

do_test() does not need to be under EDT as it invokes printer pagedialog and not \
swing components. Actually, createUI() needs to be under EDT which has not been done.

Also, 

79                 SwingUtilities.invokeAndWait(() -> {
   80                         test.disposeUI();
   81                 });
   82         }
should be called before you throw RuntimeException when test times out . 
There is no need of calling this after
75                 if (test.testResult == false) {
   76                         throw new RuntimeException("Test Failed.");
   77                 }
as it has already been called in pass/fail actionlistener.
  
Also, put a sleep after T1.start() and do_test() otherwise since they are in separate \
thread, in mycase, pagedialog is displayed before test instructions dialog.  
Regards
Prasanta

On 6/7/2017 11:50 AM, Shashidhara Veerabhadraiah wrote:

Hi All,

   I have altered the manual test template per the comments.

  

1.   Have moved the test instructions window under newly created thread.

2.   Have moved the print dialog(main test module) under EDT.

3.   Timer management shall be done on the main thread.

  

I have placed the updated Webrev @ HYPERLINK \
"http://cr.openjdk.java.net/%7Epkbalakr/shashi/6949753/webrev_03/"http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev_03/


Please let me know if any comments on it.

  

Thanks and regards,

Shashi

  

From: Prasanta Sadhukhan 
Sent: Tuesday, June 6, 2017 11:52 AM
To: Shashidhara Veerabhadraiah HYPERLINK \
"mailto:shashidhara.veerabhadraiah@oracle.com"<shashidhara.veerabhadraiah@oracle.com>; \
                HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Cc: Philip Race HYPERLINK "mailto:philip.race@oracle.com"<philip.race@oracle.com>
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

As I told, pageDialog is modal so latch.await() will not be called if user does not \
close the page dialog or do any interaction. The actual test

59                 PageFormat pageFormat = new PageFormat();
   60 
    61                 createNewPrintPageSetup(pageFormat);
   62 
    63                 setValuesForPrintPageSetup(pageFormat, 2);
   64 
    65                 createNewPrintPageSetup(pageFormat);
   66 
    67                 setValuesForPrintPageSetup(pageFormat, 3);
   68 
    69                 createNewPrintPageSetup(pageFormat);


should be done in other thread.

Regards
Prasanta

On 6/6/2017 11:24 AM, Shashidhara Veerabhadraiah wrote:

The manual test template that I received from the team seems buggy and an older \
version it seems. I have modified the same per your inputs and now placed the updated \
Webrev at HYPERLINK "http://cr.openjdk.java.net/%7Epkbalakr/shashi/6949753/webrev_02/"http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev_02/.


  

Thanks and regards,

Shashi

  

From: Prasanta Sadhukhan 
Sent: Monday, June 5, 2017 12:35 PM
To: Shashidhara Veerabhadraiah HYPERLINK \
"mailto:shashidhara.veerabhadraiah@oracle.com"<shashidhara.veerabhadraiah@oracle.com>; \
                HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Cc: Philip Race HYPERLINK "mailto:philip.race@oracle.com"<philip.race@oracle.com>
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

I guess there is one more problem in usage of CountDown latch. Have you seen this \
test fail with timeout even if you wait for 5 minutes as per your timeout period?

latch.await() needs to be wait on main thread while the test needs to be executed in \
another thread otherwise, pageDialog being modal the control will not come to \
latch.await()

Iguess you need to do this.

TestUI test = new TestUI(latch);
               Thread T1 = new Thread(test);
               T1.start();

class TestUI implements Runnable {
...
@Override
       public void run() {
               try {
                       createUI();

Regards
Prasanta

On 6/2/2017 4:00 PM, Shashidhara Veerabhadraiah wrote:

Hi, I have fixed the comments below and updated the webrev @ HYPERLINK \
"http://cr.openjdk.java.net/%7Epkbalakr/shashi/6949753/webrev_01/"http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev_01/


  

Thanks and regards,

Shashi

  

From: Prasanta Sadhukhan 
Sent: Friday, June 2, 2017 12:36 PM
To: Shashidhara Veerabhadraiah HYPERLINK \
"mailto:shashidhara.veerabhadraiah@oracle.com"<shashidhara.veerabhadraiah@oracle.com>; \
                HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net
Cc: Philip Race HYPERLINK "mailto:philip.race@oracle.com"<philip.race@oracle.com>
Subject: Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java \
needs update by removing a infinite loop

  

Test fix look ok. Only thing is, you can call getPrinterJob() once and reutilise \
instead of calling 3 times and probably there is no need of creating a function \
createNewPrintPageSetup() for it (as it calls 1 method) but it is upto you.

Few comments:

Copyright should have "," after 2017.
I guess createUI() does not have any call that throws exception so no need to have \
try-catch block for createUI(). Also, there is no need to catch PrinterException and \
rethrow RuntimeException, so you can do away with that try-catch. Also, you can call \
disposeUI() in passButton and failButton actionlistener instead of in main().   Also, \
there is no need to do setVisible(false) in disposeUI(), dispose() will take care of \
that. You can throw RuntimeException when test timed out (instead of just println and \
later getting test fail exception) which is different from Test Failed \
RuntimeException. 

Regards
Prasanta

On 6/1/2017 5:10 PM, Shashidhara Veerabhadraiah wrote:

Hi All,
Please review a fix for a test bug which contained an infinite loop to test the \
printer setup dialog's margin attributes retention without the manual step procedure. \
 The issue with PDialogTest.java which tests the printer setup dialog's margin \
attributes retention by having as infinite loop to keep popping up the dialog without \
a proper exit. The test does not cover the instruction steps necessary to properly \
test dialog's margin attributes retention.  
The updated test file includes the standard manual test template along with test \
cases to cover the printer dialog's margin attributes retention feature.  
Bug:
HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-6949753"<https://bugs.openjdk.java.net/browse/JDK-6949753>
  
Webrev:
HYPERLINK "http://cr.openjdk.java.net/%7Epkbalakr/shashi/6949753/webrev_00/"<http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev_00/>
  
Note : PrintDialog on Mac does not show page margins and hence this test does not run \
on Mac.  
Thanks and regards,
Shashi

  

  

  

  

  

  

  

  


[Attachment #5 (multipart/related)]

[Attachment #7 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 \
(filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* \
{behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:PMingLiU;
	panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
	{font-family:Tunga;
	panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
	{font-family:"\@PMingLiU";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;
	color:black;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;
	color:black;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";
	color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;
	color:black;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;
	color:black;}
span.new
	{mso-style-name:new;}
span.EmailStyle22
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle23
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle24
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle25
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle26
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle27
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle28
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle29
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle30
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
span.EmailStyle31
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1781021954;
	mso-list-type:hybrid;
	mso-list-template-ids:1732818938 67698703 67698713 67698715 67698703 67698713 \
67698715 67698703 67698713 67698715;} @list l0:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue \
vlink=purple><div class=WordSection1><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Phil, \
Please see below for my responses:<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>New Webrev \
with fixes @<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&lt;<a \
href="http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev.07/">http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev.07/</a>&gt;<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks and \
regards,<br>Shashi<o:p></o:p></span></p><p class=MsoNormal><a \
name="_MailEndCompose"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></a></p><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p \
class=MsoNormal><b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> Philip \
Race <br><b>Sent:</b> Sunday, July 9, 2017 11:58 PM<br><b>To:</b> Shashidhara \
Veerabhadraiah &lt;shashidhara.veerabhadraiah@oracle.com&gt;<br><b>Cc:</b> Prasanta \
Sadhukhan &lt;prasanta.sadhukhan@oracle.com&gt;; \
2d-dev@openjdk.java.net<br><b>Subject:</b> Re: [9]JDK-6949753:[TEST BUG]: \
java/awt/print/PageFormat/PDialogTest.java needs update by removing a infinite \
loop<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p \
class=MsoNormal style='margin-bottom:12.0pt'>displays is misspelt as diplsays in at \
least two cases.<b><i><span style='color:#1F497D'>[Shashi] </span></i></b><span \
style='color:#1F497D'>Fixed</span><br>imageable is misspelt as imagable in at least \
one case.<b><i><span style='color:#1F497D'>[Shashi] </span></i></b><span \
style='color:#1F497D'>Fixed</span><o:p></o:p></p><pre><span class=new>&quot;imageable \
area retains even after closing in the&quot;<o:p></o:p></span></pre><pre><span \
class=new><o:p>&nbsp;</o:p></span></pre><p class=MsoNormal \
style='margin-bottom:12.0pt'><span class=new>Are you trying to say &quot;is \
retained&quot; ?</span><span class=new><span \
style='color:#1F497D'><o:p></o:p></span></span></p><p class=MsoNormal \
style='margin-bottom:12.0pt'><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[Shashi] \
Paper size – margin values = new imageable area. So by setting new margin values \
and closing dialog and when reopened we have the same margin values. But the problem \
is that we don't have any api's to set the margin values but instead we have api for \
setting a new imageable area. Since we are calling setImageableArea(), the same is \
mentioned in the instructions box, to indicate that we have called that api and would \
be expecting the same to be retained back when we open up the printer dialog. Please \
let me know if this needs any changes.</span></i></b><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p></o:p></span></i></b></p><p \
class=MsoNormal style='margin-bottom:12.0pt'><br><br><span class=new>I am still not \
happy that you are hard-coding values &quot;2&quot; and &quot;3&quot; in the \
instructions</span><br><span class=new>If the printer's default paper is &lt; 6 \
inches wide this will fail.</span><br><br><span class=new>The whole thing should be \
adaptive to what it actually sees.<o:p></o:p></span></p><p class=MsoNormal \
style='margin-bottom:12.0pt'><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[Shashi] The \
test calls setSize() for the paper object to have a standard size. This function \
takes the input in parts of 1/72 of an "inch". Since a standard size has been set, \
the undersize fail won't happen.</span></i></b><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p></o:p></span></i></b></p><p \
class=MsoNormal style='margin-bottom:12.0pt'><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>But without \
calling setSize() and if we try to make it adaptive then the instructions would need \
to be dynamic and in which case we may fail in certain cases like the one you \
mentioned earlier, being ending up with negative values for the imageable area. But \
this problem won't be there if we set the values explicitly to a proper size and \
continue the testing from there. By doing this the intent of the test is not breached \
I believe. Please let me know if you think otherwise.<o:p></o:p></span></i></b></p><p \
class=MsoNormal style='margin-bottom:12.0pt'><br><br><span class=new>I am also \
unclear how you are so sure it'll be inches ?<o:p></o:p></span></p><p class=MsoNormal \
style='margin-bottom:12.0pt'><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[Shashi] \
Paper class has setSize() which takes the input as parts of 1/72th of an "inch". So \
the backend is always in this ‘parts' unit of an "inch". But the printer dialog \
adapts per the respective locale and changes the values per the selected unit \
appropriately and proportionately on the dialog.</span></i></b><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p></o:p></span></i></b></p><p \
class=MsoNormal style='margin-bottom:12.0pt'><br><span class=new>I'd expect most \
locales to use centimetres, but what you see depends</span><br><span class=new>on the \
platform .. which I expect is why you excluded Mac ?</span><br><span class=new>But \
why are you excluding Solaris too ? </span><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[Shashi] \
Modified test to include Solaris target too. Tested on Solaris 11.3 \
VM.</span></i></b><o:p></o:p></p><pre><span \
class=new>java.awt.print.PrinterJob.getPrinterJob()<o:p></o:p></span></pre><pre><span \
class=new><o:p>&nbsp;</o:p></span></pre><p class=MsoNormal><span class=new>You are \
importing all the other classes from java.awt.print,</span><br><span class=new>so why \
not this one too ?<o:p></o:p></span></p><p class=MsoNormal><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[Shashi] \
Modified test to include this static method import.</span></i></b><br><br>Whilst I \
don't have any objection to throwing a runtime exception<br>if the tester presses \
your FAIL button, you could have just used<br>the &quot;yes/no&quot; support in the \
jtreg test harness.<br><br>-phil.<br><br><br>On 6/21/17, 1:33 AM, Shashidhara \
Veerabhadraiah wrote: <o:p></o:p></p><blockquote \
style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi, Here is \
the updated Webrev with comment fixes:</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal><a href="http://cr.openjdk.java.net/%7Epkbalakr/shashi/6949753/webrev_06/"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>http://cr.openjdk.java.net/~pkbalakr/shashi/6949753/webrev_06/</span></a><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks and \
regards,</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Shashi</span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p \
class=MsoNormal><b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> \
Shashidhara Veerabhadraiah <br><b>Sent:</b> Monday, June 12, 2017 11:19 \
PM<br><b>To:</b> Philip Race </span><a href="mailto:philip.race@oracle.com"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>&lt;philip.race@oracle.com&gt;</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>; Prasanta \
Sadhukhan </span><a href="mailto:prasanta.sadhukhan@oracle.com"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>&lt;prasanta.sadhukhan@oracle.com&gt;</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><br><b>Cc:</b> \
</span><a href="mailto:2d-dev@openjdk.java.net"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>2d-dev@openjdk.java.net</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><br><b>Subject:</b> \
RE: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java needs \
update by removing a infinite loop</span><o:p></o:p></p></div></div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Ok Phil. I \
shall update the test and send it for re-review tomorrow.</span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks and \
regards,<br>Shashi</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p \
class=MsoNormal><b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> Phil Race \
<br><b>Sent:</b> Monday, June 12, 2017 11:15 PM<br><b>To:</b> Shashidhara \
Veerabhadraiah &lt;</span><a \
href="mailto:shashidhara.veerabhadraiah@oracle.com"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>shashidhara.veerabhadraiah@oracle.com</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>&gt;; \
Prasanta Sadhukhan &lt;</span><a href="mailto:prasanta.sadhukhan@oracle.com"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>prasanta.sadhukhan@oracle.com</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>&gt;<br><b>Cc:</b> \
</span><a href="mailto:2d-dev@openjdk.java.net"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>2d-dev@openjdk.java.net</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><br><b>Subject:</b> \
Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java needs \
update by removing a infinite loop</span><o:p></o:p></p></div></div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal \
style='margin-bottom:12.0pt'>The dialog does not show &quot;Letter&quot; because you \
said so. It shows it because the printer reports it supports \
letter.<br><br>-phil.<o:p></o:p></p><div><p class=MsoNormal>On 06/12/2017 10:44 AM, \
Shashidhara Veerabhadraiah wrote:<o:p></o:p></p></div><blockquote \
style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Just to \
clarify Phil for the part of cross platform print dialog, here is that dialog \
representation:</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><img border=0 \
width=383 height=409 id="Picture_x0020_3" src="cid:image002.jpg@01D2FFDA.10BDBFF0" \
alt="cid:part6.09000104.06050001@oracle.com"></span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Since this \
dialog can appear on any platform, the Paper class would represent the backend object \
for the front end dialog properties(of a generic printer) as shown in the pic above. \
Hence the use of the raw Paper object than obtaining it from the page \
format.</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>At the same \
time, as you pointed out, the test is not reliable with the actual conditions. The \
only problem I see is that the moment we change the test case to stay close to the \
actual scenario we may have certain failures because the settings are different for \
different locales and it may be difficult to adapt to every possible \
locales.</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks and \
regards,</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Shashi \
&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p \
class=MsoNormal><b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> Phil Race \
<br><b>Sent:</b> Monday, June 12, 2017 10:01 PM<br><b>To:</b> Shashidhara \
Veerabhadraiah </span><a href="mailto:shashidhara.veerabhadraiah@oracle.com"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>&lt;shashidhara.veerabhadraiah@oracle.com&gt;</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>; Prasanta \
Sadhukhan </span><a href="mailto:prasanta.sadhukhan@oracle.com"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>&lt;prasanta.sadhukhan@oracle.com&gt;</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><br><b>Cc:</b> \
</span><a href="mailto:2d-dev@openjdk.java.net"><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>2d-dev@openjdk.java.net</span></a><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><br><b>Subject:</b> \
Re: [9]JDK-6949753:[TEST BUG]: java/awt/print/PageFormat/PDialogTest.java needs \
update by removing a infinite loop</span><o:p></o:p></p></div></div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p><pre><span class=new><b><i><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>&gt;[Shashi] \
Yes. I intend to use the default paper object as this is a test related to the cross \


["image002.jpg" (image/jpeg)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic