SlideShare ist ein Scribd-Unternehmen logo
1 von 5
WebKit is an open source web browser rendering engine. It is present in almost all the famous
web browsers. Everything that is not IE, Firefox and Opera is a webkit based Browser.

The most important aspect of WebKit is WebCore’s Rendering Process. When it comes to quality
aspects of rendering process, it is made sure that every single aspect of rendering and lay-out
are tested with a standard set of tests called “Layout tests”. Layout tests are web pages. Layout
tests are used to check the correctness of the renderer. The application that runs these layout
tests and produces Render tree as output is “Dump Render Tree”.

Very chosen few organizations are working on WebKit, and out of them the organizations that
have successfully ported DumpRenderTree can be hand picked. Innominds is a proud to be in
that elite list of organizations that have ported DRT on to a mobile platform (BREW in our case.)

DRT is an app with additional methods and objects that help for testing the layout tests. Render
tree is text representation of what the application thinks its putting up on screen for that
particular html page. The output could be texts or screen shots. The tests that produce text are
called “text based tests,” and the tests that produce screen shots are “pixel based tests”.

For this project, Innominds have successfully ported DumpRenderTree and FrameLoaderClient.
There are two important aspects that deserve a mention of the porting aspects. They are
concept of TESTSERVICE and handling the GBs of data involved in Layout tests. An Engineer
working on Mobile platform doesn’t really enjoy the luxury of GB’s of data storage on
Hardware(FFA). So we had to come up with a framework that addressed both these problems.
Then evolved this TEST SERVICE concept that addressed both the problems along with CONNECT
protocol (a remoting protocol that helps in interfacing applications on Desktop to application
running on Mobile). The layout tests and expected files were combinedly occupying around
1.5GB of memory. We have also written a test service (dumprendertreebmp) that will interact
with DRT Design (mod) and uses “CONNECT” Protocol (connectDRT) to invoke this test service.

On a whole following block diagram gives a top level picture of the flow involved in execution of
layout tests.
(PERL)
           run-webkit-tests_brew--->old-run-webkit-tests_brew




                              (TEST COMPONENTS)
                       connectDRT.exe--->dumprendertreebmp




                                  (DESIGN )
                        webviewapp--->webrenderer-->DRT




DRT’s working can be best explained by analyzing its output on www.google.com url.

Following is the output and depicts the render tree giving details about their exact layout and
size information.

layer at (0,0) size 800x600
  RenderView at (0,0) size 800x600
layer at (0,0) size 800x371
  RenderBlock {HTML} at (0,0) size 800x371
   RenderBody {BODY} at (8,3) size 784x352 [bgcolor=#FFFFFF]
    RenderBlock {DIV} at (0,0) size 784x24
     RenderBlock (floating) {DIV} at (0,0) size 377x23
       RenderInline {NOBR} at (0,0) size 377x16
        RenderInline {B} at (0,0) size 29x16
          RenderText {#text} at (0,1) size 29x16
            text run at (0,1) width 29: "Web"
        RenderText {#text} at (35,1) size 4x16
          text run at (35,1) width 4: " "
        RenderInline {A} at (0,0) size 42x16 [color=#0000CC]
          RenderText {#text} at (39,1) size 42x16
text run at (39,1) width 42: "Images"
  RenderText {#text} at (87,1) size 4x16
   text run at (87,1) width 4: " "
  RenderInline {A} at (0,0) size 40x16 [color=#0000CC]
   RenderText {#text} at (91,1) size 40x16
     text run at (91,1) width 40: "Videos"
  RenderText {#text} at (137,1) size 4x16
   text run at (137,1) width 4: " "
  RenderInline {A} at (0,0) size 32x16 [color=#0000CC]
   RenderText {#text} at (141,1) size 32x16
     text run at (141,1) width 32: "Maps"
  RenderText {#text} at (179,1) size 4x16
   text run at (179,1) width 4: " "
  RenderInline {A} at (0,0) size 32x16 [color=#0000CC]
   RenderText {#text} at (183,1) size 32x16
     text run at (183,1) width 32: "News"
  RenderText {#text} at (221,1) size 4x16
   text run at (221,1) width 4: " "
  RenderInline {A} at (0,0) size 54x16 [color=#0000CC]
   RenderText {#text} at (225,1) size 54x16
     text run at (225,1) width 54: "Shopping"
  RenderText {#text} at (285,1) size 4x16
   text run at (285,1) width 4: " "
  RenderInline {A} at (0,0) size 34x16 [color=#0000CC]
   RenderText {#text} at (289,1) size 34x16
     text run at (289,1) width 34: "Gmail"
  RenderText {#text} at (329,1) size 4x16
   text run at (329,1) width 4: " "
  RenderInline {A} at (0,0) size 44x16 [color=#0000CC]
   RenderInline {U} at (0,0) size 29x16
     RenderText {#text} at (333,1) size 29x16
       text run at (333,1) width 29: "more"
   RenderText {#text} at (362,1) size 4x16
     text run at (362,1) width 4: " "
   RenderInline {SMALL} at (0,0) size 11x14
     RenderText {#text} at (366,3) size 11x14
       text run at (366,3) width 11: "x{25BC}"
RenderBlock {DIV} at (0,0) size 784x24
 RenderInline {NOBR} at (0,0) size 197x16
  RenderInline {SPAN} at (0,0) size 0x0
  RenderInline {SPAN} at (0,0) size 0x0
  RenderInline {SPAN} at (0,0) size 55x16
   RenderInline {A} at (0,0) size 44x16 [color=#0000CC]
     RenderText {#text} at (587,1) size 44x16
       text run at (587,1) width 44: "iGoogle"
   RenderText {#text} at (631,1) size 11x16
text run at (631,1) width 11: " | "
      RenderInline {A} at (0,0) size 91x16 [color=#0000CC]
       RenderText {#text} at (642,1) size 91x16
         text run at (642,1) width 91: "Search settings"
      RenderText {#text} at (733,1) size 11x16
       text run at (733,1) width 11: " | "
      RenderInline {A} at (0,0) size 40x16 [color=#0000CC]
       RenderText {#text} at (744,1) size 40x16
         text run at (744,1) width 40: "Sign in"
   RenderBlock {CENTER} at (0,24) size 784x328
    RenderBlock (anonymous) at (0,0) size 784x152
     RenderBR {BR} at (392,0) size 0x18
     RenderImage {IMG} at (254,19) size 276x110
     RenderBR {BR} at (530,114) size 0x18
     RenderBR {BR} at (392,133) size 0x18
    RenderBlock {FORM} at (0,152) size 784x64
     RenderTable {TABLE} at (0,0) size 784x64
      RenderTableSection {TBODY} at (0,0) size 784x64
       RenderTableRow {TR} at (0,0) size 784x64
         RenderTableCell {TD} at (0,0) size 134x12 [r=0 c=0 rs=1 cs=1]
           RenderText {#text} at (0,-3) size 4x18
            text run at (0,-3) width 4: " "



Close look of above tree gives a detailed explanation of what it is. We can clearly under-
stand where every element goes, and how much is its size in terms of pixels. That’s what
DumpRenderTree is all about, Every detailed information(in textual form) needed to
draw the element. It gives you color information, dimensions of the element, size of the
element, position of the element.

The tabs in the example are important, it indicates that every elements position is w.r.t its
parents indented element. For example let’s take the RenderTable of the last Ren-
derBlock, it says its position is (0, 0). Infact TableRow and TableCell inside Ren-
derTable also indicate their dimensions as (0, 0). It doesn’t mean all the elements are
starting at (0, 0) it only means they are starting at (0, 0) w.r.t to its parents element posi-
tion.

So, how is this information is used to test the renderer?. Here comes the concept of
baselining. Different targets have different screen sizes, and different platforms could
render differently. Hence we need to baseline before we test on that particular target/plat-
form. And now comes the question what is base lining.
Before we compare the actual and expected results, we first need to generate the expected
outputs for every testcase, and this process is called baselining.

After you base-line we start running the perl scripts that will build and start running the
tests. The test case might produce any of the following output.
PASS: when both expected and actual results match.
FAIL: when expected and actual mis-match.
TIMEDOUT: when a test fails to produce an output (typically under 30seconds)
CRASHED: (any test that causes DRT tool to crash)

When we compare, we compare text and we compare images too. This is where a tool
called imageDiff comes in to picture. ImageDiff is used to compare pixel by pixel infor-
mation of an image and checksums too. Checksums and images can be generated by perl
scripts by specifying particular options (typically -p).

Weitere Àhnliche Inhalte

Andere mochten auch

WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutionjuanjosanchezpenas
 
LINKING IN HTML
LINKING IN HTMLLINKING IN HTML
LINKING IN HTMLVarsha Dubey
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit RenderingAriya Hidayat
 
Duality in lpp
Duality in lppDuality in lpp
Duality in lppAbu Bashar
 
Html table tags
Html table tagsHtml table tags
Html table tagseShikshak
 
LINEAR PROGRAMMING
LINEAR PROGRAMMINGLINEAR PROGRAMMING
LINEAR PROGRAMMINGrashi9
 
Chapter I-Intro to Quantitative Analysis
Chapter I-Intro to Quantitative AnalysisChapter I-Intro to Quantitative Analysis
Chapter I-Intro to Quantitative Analysismeladariel
 
Html Ppt
Html PptHtml Ppt
Html Pptvijayanit
 

Andere mochten auch (15)

WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
 
Links in Html
Links in HtmlLinks in Html
Links in Html
 
CSS
CSSCSS
CSS
 
LINKING IN HTML
LINKING IN HTMLLINKING IN HTML
LINKING IN HTML
 
Heizer mod b
Heizer mod bHeizer mod b
Heizer mod b
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
 
Duality in lpp
Duality in lppDuality in lpp
Duality in lpp
 
Html table tags
Html table tagsHtml table tags
Html table tags
 
Chapter 7 - Linear Programming
Chapter 7 - Linear ProgrammingChapter 7 - Linear Programming
Chapter 7 - Linear Programming
 
Heizer mod a
Heizer mod aHeizer mod a
Heizer mod a
 
LINEAR PROGRAMMING
LINEAR PROGRAMMINGLINEAR PROGRAMMING
LINEAR PROGRAMMING
 
Chapter I-Intro to Quantitative Analysis
Chapter I-Intro to Quantitative AnalysisChapter I-Intro to Quantitative Analysis
Chapter I-Intro to Quantitative Analysis
 
Linear programing
Linear programingLinear programing
Linear programing
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
The WebKit project
The WebKit projectThe WebKit project
The WebKit project
 

KĂŒrzlich hochgeladen

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

KĂŒrzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Webkit (Dump Render Tree)

  • 1. WebKit is an open source web browser rendering engine. It is present in almost all the famous web browsers. Everything that is not IE, Firefox and Opera is a webkit based Browser. The most important aspect of WebKit is WebCore’s Rendering Process. When it comes to quality aspects of rendering process, it is made sure that every single aspect of rendering and lay-out are tested with a standard set of tests called “Layout tests”. Layout tests are web pages. Layout tests are used to check the correctness of the renderer. The application that runs these layout tests and produces Render tree as output is “Dump Render Tree”. Very chosen few organizations are working on WebKit, and out of them the organizations that have successfully ported DumpRenderTree can be hand picked. Innominds is a proud to be in that elite list of organizations that have ported DRT on to a mobile platform (BREW in our case.) DRT is an app with additional methods and objects that help for testing the layout tests. Render tree is text representation of what the application thinks its putting up on screen for that particular html page. The output could be texts or screen shots. The tests that produce text are called “text based tests,” and the tests that produce screen shots are “pixel based tests”. For this project, Innominds have successfully ported DumpRenderTree and FrameLoaderClient. There are two important aspects that deserve a mention of the porting aspects. They are concept of TESTSERVICE and handling the GBs of data involved in Layout tests. An Engineer working on Mobile platform doesn’t really enjoy the luxury of GB’s of data storage on Hardware(FFA). So we had to come up with a framework that addressed both these problems. Then evolved this TEST SERVICE concept that addressed both the problems along with CONNECT protocol (a remoting protocol that helps in interfacing applications on Desktop to application running on Mobile). The layout tests and expected files were combinedly occupying around 1.5GB of memory. We have also written a test service (dumprendertreebmp) that will interact with DRT Design (mod) and uses “CONNECT” Protocol (connectDRT) to invoke this test service. On a whole following block diagram gives a top level picture of the flow involved in execution of layout tests.
  • 2. (PERL) run-webkit-tests_brew--->old-run-webkit-tests_brew (TEST COMPONENTS) connectDRT.exe--->dumprendertreebmp (DESIGN ) webviewapp--->webrenderer-->DRT DRT’s working can be best explained by analyzing its output on www.google.com url. Following is the output and depicts the render tree giving details about their exact layout and size information. layer at (0,0) size 800x600 RenderView at (0,0) size 800x600 layer at (0,0) size 800x371 RenderBlock {HTML} at (0,0) size 800x371 RenderBody {BODY} at (8,3) size 784x352 [bgcolor=#FFFFFF] RenderBlock {DIV} at (0,0) size 784x24 RenderBlock (floating) {DIV} at (0,0) size 377x23 RenderInline {NOBR} at (0,0) size 377x16 RenderInline {B} at (0,0) size 29x16 RenderText {#text} at (0,1) size 29x16 text run at (0,1) width 29: "Web" RenderText {#text} at (35,1) size 4x16 text run at (35,1) width 4: " " RenderInline {A} at (0,0) size 42x16 [color=#0000CC] RenderText {#text} at (39,1) size 42x16
  • 3. text run at (39,1) width 42: "Images" RenderText {#text} at (87,1) size 4x16 text run at (87,1) width 4: " " RenderInline {A} at (0,0) size 40x16 [color=#0000CC] RenderText {#text} at (91,1) size 40x16 text run at (91,1) width 40: "Videos" RenderText {#text} at (137,1) size 4x16 text run at (137,1) width 4: " " RenderInline {A} at (0,0) size 32x16 [color=#0000CC] RenderText {#text} at (141,1) size 32x16 text run at (141,1) width 32: "Maps" RenderText {#text} at (179,1) size 4x16 text run at (179,1) width 4: " " RenderInline {A} at (0,0) size 32x16 [color=#0000CC] RenderText {#text} at (183,1) size 32x16 text run at (183,1) width 32: "News" RenderText {#text} at (221,1) size 4x16 text run at (221,1) width 4: " " RenderInline {A} at (0,0) size 54x16 [color=#0000CC] RenderText {#text} at (225,1) size 54x16 text run at (225,1) width 54: "Shopping" RenderText {#text} at (285,1) size 4x16 text run at (285,1) width 4: " " RenderInline {A} at (0,0) size 34x16 [color=#0000CC] RenderText {#text} at (289,1) size 34x16 text run at (289,1) width 34: "Gmail" RenderText {#text} at (329,1) size 4x16 text run at (329,1) width 4: " " RenderInline {A} at (0,0) size 44x16 [color=#0000CC] RenderInline {U} at (0,0) size 29x16 RenderText {#text} at (333,1) size 29x16 text run at (333,1) width 29: "more" RenderText {#text} at (362,1) size 4x16 text run at (362,1) width 4: " " RenderInline {SMALL} at (0,0) size 11x14 RenderText {#text} at (366,3) size 11x14 text run at (366,3) width 11: "x{25BC}" RenderBlock {DIV} at (0,0) size 784x24 RenderInline {NOBR} at (0,0) size 197x16 RenderInline {SPAN} at (0,0) size 0x0 RenderInline {SPAN} at (0,0) size 0x0 RenderInline {SPAN} at (0,0) size 55x16 RenderInline {A} at (0,0) size 44x16 [color=#0000CC] RenderText {#text} at (587,1) size 44x16 text run at (587,1) width 44: "iGoogle" RenderText {#text} at (631,1) size 11x16
  • 4. text run at (631,1) width 11: " | " RenderInline {A} at (0,0) size 91x16 [color=#0000CC] RenderText {#text} at (642,1) size 91x16 text run at (642,1) width 91: "Search settings" RenderText {#text} at (733,1) size 11x16 text run at (733,1) width 11: " | " RenderInline {A} at (0,0) size 40x16 [color=#0000CC] RenderText {#text} at (744,1) size 40x16 text run at (744,1) width 40: "Sign in" RenderBlock {CENTER} at (0,24) size 784x328 RenderBlock (anonymous) at (0,0) size 784x152 RenderBR {BR} at (392,0) size 0x18 RenderImage {IMG} at (254,19) size 276x110 RenderBR {BR} at (530,114) size 0x18 RenderBR {BR} at (392,133) size 0x18 RenderBlock {FORM} at (0,152) size 784x64 RenderTable {TABLE} at (0,0) size 784x64 RenderTableSection {TBODY} at (0,0) size 784x64 RenderTableRow {TR} at (0,0) size 784x64 RenderTableCell {TD} at (0,0) size 134x12 [r=0 c=0 rs=1 cs=1] RenderText {#text} at (0,-3) size 4x18 text run at (0,-3) width 4: " " Close look of above tree gives a detailed explanation of what it is. We can clearly under- stand where every element goes, and how much is its size in terms of pixels. That’s what DumpRenderTree is all about, Every detailed information(in textual form) needed to draw the element. It gives you color information, dimensions of the element, size of the element, position of the element. The tabs in the example are important, it indicates that every elements position is w.r.t its parents indented element. For example let’s take the RenderTable of the last Ren- derBlock, it says its position is (0, 0). Infact TableRow and TableCell inside Ren- derTable also indicate their dimensions as (0, 0). It doesn’t mean all the elements are starting at (0, 0) it only means they are starting at (0, 0) w.r.t to its parents element posi- tion. So, how is this information is used to test the renderer?. Here comes the concept of baselining. Different targets have different screen sizes, and different platforms could render differently. Hence we need to baseline before we test on that particular target/plat- form. And now comes the question what is base lining. Before we compare the actual and expected results, we first need to generate the expected outputs for every testcase, and this process is called baselining. After you base-line we start running the perl scripts that will build and start running the tests. The test case might produce any of the following output.
  • 5. PASS: when both expected and actual results match. FAIL: when expected and actual mis-match. TIMEDOUT: when a test fails to produce an output (typically under 30seconds) CRASHED: (any test that causes DRT tool to crash) When we compare, we compare text and we compare images too. This is where a tool called imageDiff comes in to picture. ImageDiff is used to compare pixel by pixel infor- mation of an image and checksums too. Checksums and images can be generated by perl scripts by specifying particular options (typically -p).