Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311172

Summary: Javascript GCTest fails in Firefox 3.0
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.3   
Target Milestone: 1.3 RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Ralf Sternberg CLA 2010-04-30 09:36:03 EDT
Firefox 3.0.19 on Ubuntu:

+ org.eclipse.rwt.test.tests.GCTest
testCreateAndDisposeGC - OK
testCreateGCBeforeControl - OK
testCanvasWithChildren - OK
testSetAndResetFields - OK
testSaveAndRestoreFields failed:
Assert "14", type "assertEquals" failed : Expected "italic bold 16px Arial" but found "10px Arial"
13 asserts succeeded.
Tests aborted!
Comment 1 Ivan Furnadjiev CLA 2010-04-30 10:34:16 EDT
In Firefox, the <canvas> context "font" attribute requires Gecko 1.9.1 ( Firefox 3.5+ ). As we don't use canvas for drawing the text (for the same reason - Firefox 3.5+ is needed ) we can introduce "font" property in GC.js instead of canvas context.
Comment 2 Ivan Furnadjiev CLA 2010-05-05 03:39:09 EDT
Looking more deeply into the issue I found that the problem is not in the "font" attribute itself, but in context save() and restore() function. As canvas context "font" attribute is not supported in FF < 3.5, save/restore do not respect it. We don't use save/restore of "font" attribute in our code, thus - no broken functionality. Need to fix only the test somehow.
Comment 3 Ivan Furnadjiev CLA 2010-05-07 10:13:00 EDT
Fixed in CVS HEAD.