New issue
Advanced search Search tips

Issue 663093 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Improve layout test infrastructure for WebAudio

Project Member Reported by hongchan@chromium.org, Nov 7 2016

Issue description

Deprecate the current test utility over the new one:
- To support W3C web platform test infra.
- To improve the workflow and the test output.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c06bb6dbd09d88d8d2e8ecda9e9a016d9b3dfe40

commit c06bb6dbd09d88d8d2e8ecda9e9a016d9b3dfe40
Author: hongchan <hongchan@chromium.org>
Date: Wed Nov 30 08:00:23 2016

The sample result from |audit.html| unit test:
----
This is a testharness.js-based test.
PASS # AUDIT TASK RUNNER STARTED.
PASS > [basic] Simple unit tests for basic assertions.
PASS   OfflineAudioContext does exist.
PASS   Setting foo to 0 did not throw an exception.
PASS   function () { var foo = bar; } threw ReferenceError : "bar is not defined".
PASS   3 < 5 is true.
PASS   false is false.
PASS   1 is equal to 1.
PASS   1 is not equal to 2.
PASS   object is equal to object.
PASS   2 is greater than 1.
PASS   2 is greater than or equal to 2.
PASS   1 is less than 2.
PASS   1 is less than or equal to 1.
PASS   undefined rejected correctly with TypeError: Failed to execute 'decodeAudioData' on 'BaseAudioContext': 1 argument required, but only 0 present..
PASS   Start OAC rendering resolved correctly.
PASS < [basic] All assertion passed. (total 14 assertions)
PASS > [numerical] Numerical assertion unit test.
PASS   2.3 is 2 within an error of 0.3
PASS   [1,1,1] contains only the constant 1.
FAIL X [1,8,11,18,6,5,5,5,123,49] contains 7 values that are *NOT* equal to 5:
	Index	Actual
	[0]	1
	[1]	8
	[2]	11
	[3]	18
	...and 3 more errors. assert_true: expected true got false
PASS   [1,1,1] is identical to the array [1,1,1].
FAIL X [1,8,11,18,6,5,5,5,123,49] contains 3 values that are *NOT* equal to [1,8,10,18,6,5,6,5,123,48]:
	Index	Actual			Expected
	[2]	1.1000000000000000e+1	1.0000000000000000e+1
	[6]	5.0000000000000000e+0	6.0000000000000000e+0
	[9]	4.9000000000000000e+1	4.8000000000000000e+1 assert_true: expected true got false
PASS   [1,1,1,1,2,2,3,3,3] contains all the expected values in the correct order: one, two, three.
FAIL X [1,1,1,1,2,2,3,3,3] contains an unexpected value of 3 at index 6. assert_true: expected true got false
PASS   [0.5,0.5,0.55,0.5,0.45,0.5] has no glitch above the threshold of 0.06.
FAIL X [0.5,0.5,0.55,0.5,0.45,0.5] has a glitch at index 5 of size 0.04999999999999999. assert_true: expected true got false
FAIL X [0.11,0.19] does not equal [0.1,0.3] with an element-wise tolerance of {"absoluteThreshold":0.02,"relativeThreshold":0.1}.
	Index	Actual			Expected		AbsError		RelError		Test threshold
	[1]	1.9000000000000000e-1	2.9999999999999999e-1	1.0999999999999999e-1	3.6666666666666664e-1	2.9999999999999999e-2
	Max AbsError of 1.0999999999999999e-1 at index of 1.
	Max RelError of 3.6666666666666664e-1 at index of 1. assert_true: expected true got false
FAIL X [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.9] does not equal [0.7,0.6,0.5,0.4,0.3,0.2,0.1] with an element-wise tolerance of {"absoluteThreshold":0.02,"relativeThreshold":0.1}.
	Index	Actual			Expected		AbsError		RelError		Test threshold
	[0]	1.0000000000000001e-1	6.9999999999999996e-1	5.9999999999999998e-1	8.5714285714285721e-1	6.9999999999999993e-2
	[1]	2.0000000000000001e-1	5.9999999999999998e-1	3.9999999999999997e-1	6.6666666666666663e-1	5.9999999999999998e-2
	[2]	2.9999999999999999e-1	5.0000000000000000e-1	2.0000000000000001e-1	4.0000000000000002e-1	5.0000000000000003e-2
	[4]	5.0000000000000000e-1	2.9999999999999999e-1	2.0000000000000001e-1	6.6666666666666674e-1	2.9999999999999999e-2
	[5]	5.9999999999999998e-1	2.0000000000000001e-1	3.9999999999999997e-1	1.9999999999999998e+0	2.0000000000000004e-2
	Max AbsError of 5.9999999999999998e-1 at index of 0.
	Max RelError of 5.9999999999999991e+0 at index of 6. assert_true: expected true got false
FAIL < [numerical] 6 out of 11 assertions were failed. assert_true: expected true got false
FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 2 tasks were failed. assert_true: expected true got false
Harness: the test ran to completion.
----

BUG= 663093 
TEST= LayoutTests/webaudio/unit-tests/audit.html

Review-Url: https://codereview.chromium.org/2435593009
Cr-Commit-Position: refs/heads/master@{#435150}

[add] https://crrev.com/c06bb6dbd09d88d8d2e8ecda9e9a016d9b3dfe40/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
[add] https://crrev.com/c06bb6dbd09d88d8d2e8ecda9e9a016d9b3dfe40/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html

Status: Verified (was: Started)

Sign in to add a comment