Changeset 70794 in webkit


Ignore:
Timestamp:
Oct 28, 2010 12:05:41 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-28 Adrienne Walker <enne@google.com>

Reviewed by Kenneth Russell.

Add shouldBeDefined function to js-test-pre.js and update
context-attributes-etc test to use it.
https://bugs.webkit.org/show_bug.cgi?id=47853

  • fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt:
  • fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html:
  • fast/dom/Window/window-property-descriptors-expected.txt:
  • fast/js/resources/js-test-pre.js: (shouldBeDefined):
Location:
trunk/LayoutTests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r70792 r70794  
     12010-10-28  Adrienne Walker  <enne@google.com>
     2
     3        Reviewed by Kenneth Russell.
     4
     5        Add shouldBeDefined function to js-test-pre.js and update
     6        context-attributes-etc test to use it.
     7        https://bugs.webkit.org/show_bug.cgi?id=47853
     8
     9        * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt:
     10        * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html:
     11        * fast/dom/Window/window-property-descriptors-expected.txt:
     12        * fast/js/resources/js-test-pre.js:
     13        (shouldBeDefined):
     14
    1152010-10-28  Chris Fleizach  <cfleizach@apple.com>
    216
  • trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt

    r69996 r70794  
    77PASS webGL = getWebGL('alphaOn', { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
    88PASS contextAttribs = webGL.getContextAttributes() is non-null.
    9 PASS contextAttribs.alpha is non-null.
    10 PASS contextAttribs.depth is non-null.
    11 PASS contextAttribs.stencil is non-null.
    12 PASS contextAttribs.antialias is non-null.
    13 PASS contextAttribs.premultipliedAlpha is non-null.
     9PASS contextAttribs.alpha is defined.
     10PASS contextAttribs.depth is defined.
     11PASS contextAttribs.stencil is defined.
     12PASS contextAttribs.antialias is defined.
     13PASS contextAttribs.premultipliedAlpha is defined.
    1414PASS pixel is correctColor
    1515Testing alpha = false
    1616PASS webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
    1717PASS contextAttribs = webGL.getContextAttributes() is non-null.
    18 PASS contextAttribs.alpha is non-null.
    19 PASS contextAttribs.depth is non-null.
    20 PASS contextAttribs.stencil is non-null.
    21 PASS contextAttribs.antialias is non-null.
    22 PASS contextAttribs.premultipliedAlpha is non-null.
     18PASS contextAttribs.alpha is defined.
     19PASS contextAttribs.depth is defined.
     20PASS contextAttribs.stencil is defined.
     21PASS contextAttribs.antialias is defined.
     22PASS contextAttribs.premultipliedAlpha is defined.
    2323PASS pixel is correctColor
    2424Testing depth = true
    2525PASS webGL = getWebGL('depthOn', { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    2626PASS contextAttribs = webGL.getContextAttributes() is non-null.
    27 PASS contextAttribs.depth is non-null.
    28 PASS contextAttribs.alpha is non-null.
    29 PASS contextAttribs.stencil is non-null.
    30 PASS contextAttribs.antialias is non-null.
    31 PASS contextAttribs.premultipliedAlpha is non-null.
     27PASS contextAttribs.depth is defined.
     28PASS contextAttribs.alpha is defined.
     29PASS contextAttribs.stencil is defined.
     30PASS contextAttribs.antialias is defined.
     31PASS contextAttribs.premultipliedAlpha is defined.
    3232PASS pixel is correctColor
    3333Testing depth = false
    3434PASS webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    3535PASS contextAttribs = webGL.getContextAttributes() is non-null.
    36 PASS contextAttribs.depth is non-null.
    37 PASS contextAttribs.alpha is non-null.
    38 PASS contextAttribs.stencil is non-null.
    39 PASS contextAttribs.antialias is non-null.
    40 PASS contextAttribs.premultipliedAlpha is non-null.
     36PASS contextAttribs.depth is defined.
     37PASS contextAttribs.alpha is defined.
     38PASS contextAttribs.stencil is defined.
     39PASS contextAttribs.antialias is defined.
     40PASS contextAttribs.premultipliedAlpha is defined.
    4141PASS pixel is correctColor
    4242Testing stencil = true
    4343PASS webGL = getWebGL('stencilOn', { depth: false, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    4444PASS contextAttribs = webGL.getContextAttributes() is non-null.
    45 PASS contextAttribs.depth is non-null.
    46 PASS contextAttribs.alpha is non-null.
    47 PASS contextAttribs.stencil is non-null.
    48 PASS contextAttribs.antialias is non-null.
    49 PASS contextAttribs.premultipliedAlpha is non-null.
     45PASS contextAttribs.depth is defined.
     46PASS contextAttribs.alpha is defined.
     47PASS contextAttribs.stencil is defined.
     48PASS contextAttribs.antialias is defined.
     49PASS contextAttribs.premultipliedAlpha is defined.
    5050PASS pixel is correctColor
    5151Testing stencil = false
    5252PASS webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    5353PASS contextAttribs = webGL.getContextAttributes() is non-null.
    54 PASS contextAttribs.depth is non-null.
    55 PASS contextAttribs.alpha is non-null.
    56 PASS contextAttribs.stencil is non-null.
    57 PASS contextAttribs.antialias is non-null.
    58 PASS contextAttribs.premultipliedAlpha is non-null.
     54PASS contextAttribs.depth is defined.
     55PASS contextAttribs.alpha is defined.
     56PASS contextAttribs.stencil is defined.
     57PASS contextAttribs.antialias is defined.
     58PASS contextAttribs.premultipliedAlpha is defined.
    5959PASS pixel is correctColor
    6060Testing antialias = true
    6161PASS webGL = getWebGL('antialiasOn', { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    6262PASS contextAttribs = webGL.getContextAttributes() is non-null.
    63 PASS contextAttribs.depth is non-null.
    64 PASS contextAttribs.alpha is non-null.
    65 PASS contextAttribs.stencil is non-null.
    66 PASS contextAttribs.antialias is non-null.
    67 PASS contextAttribs.premultipliedAlpha is non-null.
     63PASS contextAttribs.depth is defined.
     64PASS contextAttribs.alpha is defined.
     65PASS contextAttribs.stencil is defined.
     66PASS contextAttribs.antialias is defined.
     67PASS contextAttribs.premultipliedAlpha is defined.
    6868PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias
    6969Testing antialias = false
    7070PASS webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    7171PASS contextAttribs = webGL.getContextAttributes() is non-null.
    72 PASS contextAttribs.depth is non-null.
    73 PASS contextAttribs.alpha is non-null.
    74 PASS contextAttribs.stencil is non-null.
    75 PASS contextAttribs.antialias is non-null.
    76 PASS contextAttribs.premultipliedAlpha is non-null.
     72PASS contextAttribs.depth is defined.
     73PASS contextAttribs.alpha is defined.
     74PASS contextAttribs.stencil is defined.
     75PASS contextAttribs.antialias is defined.
     76PASS contextAttribs.premultipliedAlpha is defined.
    7777PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias
    7878PASS successfullyParsed is true
  • trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html

    r70414 r70794  
    141141        shouldBeNonNull("webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)");
    142142    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
    143     shouldBeNonNull("contextAttribs.alpha");
    144     shouldBeNonNull("contextAttribs.depth");
    145     shouldBeNonNull("contextAttribs.stencil");
    146     shouldBeNonNull("contextAttribs.antialias");
    147     shouldBeNonNull("contextAttribs.premultipliedAlpha");
     143    shouldBeDefined("contextAttribs.alpha");
     144    shouldBeDefined("contextAttribs.depth");
     145    shouldBeDefined("contextAttribs.stencil");
     146    shouldBeDefined("contextAttribs.antialias");
     147    shouldBeDefined("contextAttribs.premultipliedAlpha");
    148148
    149149    var buf = new Uint8Array(1 * 1 * 4);
     
    165165        shouldBeNonNull("webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
    166166    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
    167     shouldBeNonNull("contextAttribs.depth");
    168     shouldBeNonNull("contextAttribs.alpha");
    169     shouldBeNonNull("contextAttribs.stencil");
    170     shouldBeNonNull("contextAttribs.antialias");
    171     shouldBeNonNull("contextAttribs.premultipliedAlpha");
     167    shouldBeDefined("contextAttribs.depth");
     168    shouldBeDefined("contextAttribs.alpha");
     169    shouldBeDefined("contextAttribs.stencil");
     170    shouldBeDefined("contextAttribs.antialias");
     171    shouldBeDefined("contextAttribs.premultipliedAlpha");
    172172
    173173    webGL.depthFunc(webGL.NEVER);
     
    205205        shouldBeNonNull("webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
    206206    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
    207     shouldBeNonNull("contextAttribs.depth");
    208     shouldBeNonNull("contextAttribs.alpha");
    209     shouldBeNonNull("contextAttribs.stencil");
    210     shouldBeNonNull("contextAttribs.antialias");
    211     shouldBeNonNull("contextAttribs.premultipliedAlpha");
     207    shouldBeDefined("contextAttribs.depth");
     208    shouldBeDefined("contextAttribs.alpha");
     209    shouldBeDefined("contextAttribs.stencil");
     210    shouldBeDefined("contextAttribs.antialias");
     211    shouldBeDefined("contextAttribs.premultipliedAlpha");
    212212
    213213    webGL.depthFunc(webGL.ALWAYS);
     
    248248        shouldBeNonNull("webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
    249249    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
    250     shouldBeNonNull("contextAttribs.depth");
    251     shouldBeNonNull("contextAttribs.alpha");
    252     shouldBeNonNull("contextAttribs.stencil");
    253     shouldBeNonNull("contextAttribs.antialias");
    254     shouldBeNonNull("contextAttribs.premultipliedAlpha");
     250    shouldBeDefined("contextAttribs.depth");
     251    shouldBeDefined("contextAttribs.alpha");
     252    shouldBeDefined("contextAttribs.stencil");
     253    shouldBeDefined("contextAttribs.antialias");
     254    shouldBeDefined("contextAttribs.premultipliedAlpha");
    255255
    256256    var vertices = new Float32Array([
  • trunk/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt

    r69553 r70794  
    461461PASS typeof Object.getOwnPropertyDescriptor(window, 'sessionStorage') is 'object'
    462462PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBe') is 'object'
     463PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBeDefined') is 'object'
    463464PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBeEqualToString') is 'object'
    464465PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBeFalse') is 'object'
  • trunk/LayoutTests/fast/js/resources/js-test-pre.js

    r69138 r70794  
    220220}
    221221
     222function shouldBeDefined(_a)
     223{
     224  var exception;
     225  var _av;
     226  try {
     227     _av = eval(_a);
     228  } catch (e) {
     229     exception = e;
     230  }
     231
     232  if (exception)
     233    testFailed(_a + " should be defined. Threw exception " + exception);
     234  else if (_av !== undefined)
     235    testPassed(_a + " is defined.");
     236  else
     237    testFailed(_a + " should be defined. Was " + _av);
     238}
     239
    222240function shouldBeGreaterThanOrEqual(_a, _b) {
    223241    if (typeof _a != "string" || typeof _b != "string")
Note: See TracChangeset for help on using the changeset viewer.