Changeset 111411 in webkit


Ignore:
Timestamp:
Mar 20, 2012 10:56:15 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Convert regions parsing test to use testharness.js
https://bugs.webkit.org/show_bug.cgi?id=80709

Patch by Jacob Goldstein <jacobg@adobe.com> on 2012-03-20
Reviewed by Ryosuke Niwa.

  • fast/regions/script-tests/webkit-flow-parsing.js:

(testParse):
(testComputedStyle):
(testNotInherited):
(test):

  • fast/regions/webkit-flow-parsing-expected.txt:
  • fast/regions/webkit-flow-parsing.html:
  • resources/testharness.js: Added.

(.):

  • resources/testharnessreport.js: Added.

(convertResult):

Location:
trunk/LayoutTests
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r111409 r111411  
     12012-03-20  Jacob Goldstein  <jacobg@adobe.com>
     2
     3        Convert regions parsing test to use testharness.js
     4        https://bugs.webkit.org/show_bug.cgi?id=80709
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * fast/regions/script-tests/webkit-flow-parsing.js:
     9        (testParse):
     10        (testComputedStyle):
     11        (testNotInherited):
     12        (test):
     13        * fast/regions/webkit-flow-parsing-expected.txt:
     14        * fast/regions/webkit-flow-parsing.html:
     15        * resources/testharness.js: Added.
     16        (.):
     17        * resources/testharnessreport.js: Added.
     18        (convertResult):
     19
    1202012-03-20  Vsevolod Vlasov  <vsevik@chromium.org>
    221
  • trunk/LayoutTests/fast/regions/script-tests/webkit-flow-parsing.js

    r109015 r111411  
    1 description('Test parsing of the CSS webkit-flow-into property.');
    2 
    3 function test(declaration) {
     1function testParse(declaration) {
    42    var div = document.createElement("div");
    53    div.setAttribute("style", declaration);
     
    3331}
    3432
    35 shouldBeEqualToString('test("-webkit-flow-into: none")', "none");
    36 shouldBeEqualToString('test("-webkit-flow-into: first-flow")', "first-flow");
    37 shouldBeEqualToString('test("-webkit-flow-into: \'first flow\'")', "");
    38 shouldBeEqualToString('test("-webkit-flow-into: ;")', "");
    39 shouldBeEqualToString('test("-webkit-flow-into: 1")', "");
    40 shouldBeEqualToString('test("-webkit-flow-into: 1.2")', "");
    41 shouldBeEqualToString('test("-webkit-flow-into: -1")', "");
    42 shouldBeEqualToString('test("-webkit-flow-into: 12px")', "");
     33test(function() {assert_equals(testParse("-webkit-flow-into: none"), "none")}, "Test Parse none");
     34test(function() {assert_equals(testParse("-webkit-flow-into: first-flow"), "first-flow")}, "Test Parse first-flow");
     35test(function() {assert_equals(testParse("-webkit-flow-into: \'first flow\'"), "")}, "Test Parse 'first-flow'");
     36test(function() {assert_equals(testParse("-webkit-flow-into: ;"), "")}, "Test Parse ;");
     37test(function() {assert_equals(testParse("-webkit-flow-into: 1"), "")}, "Test Parse 1");
     38test(function() {assert_equals(testParse("-webkit-flow-into: 1.2"), "")}, "Test Parse 1.2");
     39test(function() {assert_equals(testParse("-webkit-flow-into: -1"), "")}, "Test Parse -1");
     40test(function() {assert_equals(testParse("-webkit-flow-into: 12px"), "")}, "Test Parse 12px");
    4341
    44 shouldBeEqualToString('testComputedStyle("none")', "none");
    45 shouldBeEqualToString('testComputedStyle("")', "none");
    46 shouldBeEqualToString('testComputedStyle("\'first-flow\'")', "none");
    47 shouldBeEqualToString('testComputedStyle("first-flow")', "first-flow");
    48 shouldBeEqualToString('testComputedStyle("12px")', "none");
     42test(function() {assert_equals(testComputedStyle("none"), "none")}, "Test Computed Style none");
     43test(function() {assert_equals(testComputedStyle(""), "none")}, "Test Computed Style ''");
     44test(function() {assert_equals(testComputedStyle("\'first-flow\'"), "none")}, "Test Computed Style 'first-flow'");
     45test(function() {assert_equals(testComputedStyle("first-flow"), "first-flow")}, "Test Computed Style first-flow");
     46test(function() {assert_equals(testComputedStyle("12px"), "none")}, "Test Computed Style 12px ");
    4947
    50 shouldBeEqualToString('testNotInherited("none", "none")', "none");
    51 shouldBeEqualToString('testNotInherited("none", "child-flow")', "child-flow");
    52 shouldBeEqualToString('testNotInherited("parent-flow", "none")', "none");
    53 shouldBeEqualToString('testNotInherited("parent-flow", "child-flow")', "child-flow");
     48test(function() {assert_equals(testNotInherited("none", "none"), "none")}, "Test Non-Inherited none, none");
     49test(function() {assert_equals(testNotInherited("none", "child-flow"), "child-flow")}, "Test Non-Inherited none, child-flow");
     50test(function() {assert_equals(testNotInherited("parent-flow", "none"), "none")}, "Test Non-Inherited parent-flow, none");
     51test(function() {assert_equals(testNotInherited("parent-flow", "child-flow"), "child-flow")}, "Test Non-Inherited parent-flow, child-flow");
  • trunk/LayoutTests/fast/regions/webkit-flow-parsing-expected.txt

    r109015 r111411  
    1 Test parsing of the CSS webkit-flow-into property.
     1This test verifies that the webkit-flow-into property is correctly parsed
    22
    3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     3PASS Test Parse none
     4PASS Test Parse first-flow
     5PASS Test Parse 'first-flow'
     6PASS Test Parse ;
     7PASS Test Parse 1
     8PASS Test Parse 1.2
     9PASS Test Parse -1
     10PASS Test Parse 12px
     11PASS Test Computed Style none
     12PASS Test Computed Style ''
     13PASS Test Computed Style 'first-flow'
     14PASS Test Computed Style first-flow
     15PASS Test Computed Style 12px 
     16PASS Test Non-Inherited none, none
     17PASS Test Non-Inherited none, child-flow
     18PASS Test Non-Inherited parent-flow, none
     19PASS Test Non-Inherited parent-flow, child-flow
    420
    5 
    6 PASS test("-webkit-flow-into: none") is "none"
    7 PASS test("-webkit-flow-into: first-flow") is "first-flow"
    8 PASS test("-webkit-flow-into: 'first flow'") is ""
    9 PASS test("-webkit-flow-into: ;") is ""
    10 PASS test("-webkit-flow-into: 1") is ""
    11 PASS test("-webkit-flow-into: 1.2") is ""
    12 PASS test("-webkit-flow-into: -1") is ""
    13 PASS test("-webkit-flow-into: 12px") is ""
    14 PASS testComputedStyle("none") is "none"
    15 PASS testComputedStyle("") is "none"
    16 PASS testComputedStyle("'first-flow'") is "none"
    17 PASS testComputedStyle("first-flow") is "first-flow"
    18 PASS testComputedStyle("12px") is "none"
    19 PASS testNotInherited("none", "none") is "none"
    20 PASS testNotInherited("none", "child-flow") is "child-flow"
    21 PASS testNotInherited("parent-flow", "none") is "none"
    22 PASS testNotInherited("parent-flow", "child-flow") is "child-flow"
    23 PASS successfullyParsed is true
    24 
    25 TEST COMPLETE
    26 
  • trunk/LayoutTests/fast/regions/webkit-flow-parsing.html

    r97881 r111411  
    1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
     1<!DOCTYPE html>
    22<html>
    3 <head>
    4 <script src="../../fast/js/resources/js-test-pre.js"></script>
    5 </head>
    6 <body>
    7 <script src="script-tests/webkit-flow-parsing.js"></script>
    8 <script src="../../fast/js/resources/js-test-post.js"></script>
    9 </body>
     3    <head>
     4        <title>CSS Regions Parsing Test: Parse webkit-flow-into property</title>
     5        <link rel="author" title="Jacob Goldstein" href="mailto:jacobg@adobe.com"/>
     6        <link rel="help" href="http://www.w3.org/TR/css3-regions/#properties-and-rules"/>
     7        <meta name="flags" content=""/>
     8        <meta name="assert" content="Value specified for the webkit-flow-into property should be parsed correctly."/>
     9        <script src="../../resources/testharness.js"></script>
     10        <script src="../../resources/testharnessreport.js"></script>       
     11    </head>
     12    <body>
     13        <span>This test verifies that the webkit-flow-into property is correctly parsed</span>
     14        <div id="log"></div>
     15        <script src="script-tests/webkit-flow-parsing.js"></script>
     16    </body>
    1017</html>
Note: See TracChangeset for help on using the changeset viewer.