WebKit Bugzilla
Attachment 369698 Details for
Bug 196448
: [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-196448-20190512232959.patch (text/plain), 32.90 KB, created by
Devin Rousso
on 2019-05-12 23:30:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-05-12 23:30:00 PDT
Size:
32.90 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index cfb54ec997b3dd6aad439fff10d08c9023f86465..e2ea185fd7eed9e71249085e1cedb9e9a0b39da1 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,36 @@ >+2019-05-12 Devin Rousso <drousso@apple.com> >+ >+ [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots >+ https://bugs.webkit.org/show_bug.cgi?id=196448 >+ <rdar://problem/49485452> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Split inspector/audit/basic.html into separate tests so each part can run without timing out. >+ >+ * inspector/audit/basic-async.html: Added. >+ * inspector/audit/basic-async-expected.txt: Added. >+ * inspector/audit/basic-boolean.html: Added. >+ * inspector/audit/basic-boolean-expected.txt: Added. >+ * inspector/audit/basic-debugger.html: Added. >+ * inspector/audit/basic-debugger-expected.txt: Added. >+ * inspector/audit/basic-error.html: Added. >+ * inspector/audit/basic-error-expected.txt: Added. >+ * inspector/audit/basic-object.html: Added. >+ * inspector/audit/basic-object-expected.txt: Added. >+ * inspector/audit/basic-promise.html: Added. >+ * inspector/audit/basic-promise-expected.txt: Added. >+ * inspector/audit/basic-string.html: Added. >+ * inspector/audit/basic-string-expected.txt: Added. >+ * inspector/audit/basic-timeout.html: Added. >+ * inspector/audit/basic-timeout-expected.txt: Added. >+ >+ * inspector/audit/basic.html: Removed. >+ * inspector/audit/basic-expected.txt: Removed. >+ >+ * platform/mac-wk1/TestExpectations: >+ * platform/mac-wk2/TestExpectations: >+ > 2019-05-11 Simon Fraser <simon.fraser@apple.com> > > Backing-sharing layers with transforms render incorrectly >diff --git a/LayoutTests/inspector/audit/basic-async-expected.txt b/LayoutTests/inspector/audit/basic-async-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..5391af4f149d7caeb9415e7d0819d52460718517 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-async-expected.txt >@@ -0,0 +1,16 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.Async.Boolean.True >+Testing value `true`... >+PASS: Result should be "pass". >+ >+-- Running test case: Audit.Basic.Async.String.Pass >+Testing value `"pass"`... >+PASS: Result should be "pass". >+ >+-- Running test case: Audit.Basic.Async.Object.Pass >+Testing value `{"level":"pass"}`... >+PASS: Result should be "pass". >+ >diff --git a/LayoutTests/inspector/audit/basic-async.html b/LayoutTests/inspector/audit/basic-async.html >new file mode 100644 >index 0000000000000000000000000000000000000000..e2d194a645dd8c51a6200f5cdf75185ea28deb83 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-async.html >@@ -0,0 +1,27 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Async.Boolean.True", true, WI.AuditTestCaseResult.Level.Pass, {async: true}); >+ InspectorTest.Audit.addStringTest("Audit.Basic.Async.String.Pass", WI.AuditTestCaseResult.Level.Pass, WI.AuditTestCaseResult.Level.Pass, {async: true}); >+ InspectorTest.Audit.addObjectTest("Audit.Basic.Async.Object.Pass", {level: WI.AuditTestCaseResult.Level.Pass}, WI.AuditTestCaseResult.Level.Pass, {async: true}); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic-boolean-expected.txt b/LayoutTests/inspector/audit/basic-boolean-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..341add062683bc361acaad719755878be8e9b80e >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-boolean-expected.txt >@@ -0,0 +1,12 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.Boolean.True >+Testing value `true`... >+PASS: Result should be "pass". >+ >+-- Running test case: Audit.Basic.Boolean.False >+Testing value `false`... >+PASS: Result should be "fail". >+ >diff --git a/LayoutTests/inspector/audit/basic-boolean.html b/LayoutTests/inspector/audit/basic-boolean.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6b4e68b859de22bce410baad85f6b7f348860156 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-boolean.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Boolean.True", true, WI.AuditTestCaseResult.Level.Pass); >+ InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Boolean.False", false, WI.AuditTestCaseResult.Level.Fail); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic-debugger-expected.txt b/LayoutTests/inspector/audit/basic-debugger-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ac4d1fdcc0294273debe6bb3428b8b3a49839f0b >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-debugger-expected.txt >@@ -0,0 +1,9 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.Debugger >+Testing `debugger`... >+PASS: Should not pause on the debugger statement. >+PASS: Result should be "pass". >+ >diff --git a/LayoutTests/inspector/audit/basic-debugger.html b/LayoutTests/inspector/audit/basic-debugger.html >new file mode 100644 >index 0000000000000000000000000000000000000000..1744ed7b6a6b08e053af688c1d177cf8e2ceb38b >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-debugger.html >@@ -0,0 +1,56 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ suite.addTestCase({ >+ name: "Audit.Basic.Debugger", >+ description: "Test that a debugger statement doesn't pause when running an audit.", >+ test(resolve, reject) { >+ const level = "pass"; >+ let audit = new WI.AuditTestCase("Audit.Basic.Debugger", `function() { debugger; return "${level}"; }`); >+ >+ let paused = false; >+ let pausedListener = WI.debuggerManager.singleFireEventListener(WI.DebuggerManager.Event.Paused, (event) => { >+ paused = true; >+ >+ WI.debuggerManager.resume(); >+ }); >+ >+ WI.auditManager.awaitEvent(WI.AuditManager.Event.TestCompleted).then((event) => { >+ InspectorTest.expectFalse(paused, "Should not pause on the debugger statement."); >+ WI.debuggerManager.removeEventListener(WI.DebuggerManager.Event.Paused, pausedListener); >+ >+ let results = WI.auditManager.results.lastValue; >+ InspectorTest.assert(results.length === 1, "There should be 1 result."); >+ >+ let result = results[0]; >+ InspectorTest.assert(result instanceof WI.AuditTestCaseResult, "Result should be a WI.AuditTestCaseResult."); >+ InspectorTest.expectEqual(result.level, level, `Result should be "${level}".`); >+ }); >+ >+ InspectorTest.log("Testing `debugger`..."); >+ >+ WI.auditManager.start([audit]) >+ .then(resolve, reject); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic-error-expected.txt b/LayoutTests/inspector/audit/basic-error-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..2dc46fd56308d3980d80f5f1ea1d5a31b4a81534 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-error-expected.txt >@@ -0,0 +1,52 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.Error.Undefined >+Testing value `undefined`... >+PASS: Result should be "error". >+ errors: >+ - Return value is not an object, string, or boolean >+ >+-- Running test case: Audit.Basic.Error.Null >+Testing value `null`... >+PASS: Result should be "error". >+ errors: >+ - Return value is not an object, string, or boolean >+ >+-- Running test case: Audit.Basic.Error.Number >+Testing value `42`... >+PASS: Result should be "error". >+ errors: >+ - Return value is not an object, string, or boolean >+ >+-- Running test case: Audit.Basic.Error.String >+Testing value `"foo"`... >+PASS: Result should be "error". >+ errors: >+ - Return string must be one of ["pass","warn","fail","error","unsupported"] >+ >+-- Running test case: Audit.Basic.Error.Object >+Testing value `{}`... >+PASS: Result should be "error". >+ errors: >+ - Missing result level >+ >+-- Running test case: Audit.Basic.Error.Variable >+Testing value `INVALID`... >+PASS: Result should be "error". >+ errors: >+ - ReferenceError: Can't find variable: INVALID >+ >+-- Running test case: Audit.Basic.Error.Promise.Resolved >+Testing value `new Promise((resolve, reject) => setTimeout(resolve, 0))`... >+PASS: Result should be "error". >+ errors: >+ - Return value is not an object, string, or boolean >+ >+-- Running test case: Audit.Basic.Error.Promise.Rejected >+Testing value `new Promise((resolve, reject) => setTimeout(reject, 0, "rejected"))`... >+PASS: Result should be "error". >+ errors: >+ - rejected >+ >diff --git a/LayoutTests/inspector/audit/basic-error.html b/LayoutTests/inspector/audit/basic-error.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f3782ecd1cf087ab42c1c0a0e9eb67a3544bdda7 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-error.html >@@ -0,0 +1,32 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Undefined", undefined, WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Null", null, WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Number", 42, WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addStringTest("Audit.Basic.Error.String", "foo", WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addObjectTest("Audit.Basic.Error.Object", {}, WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Variable", "INVALID", WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addPromiseTest("Audit.Basic.Error.Promise.Resolved", `setTimeout(resolve, 0)`, WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addPromiseTest("Audit.Basic.Error.Promise.Rejected", `setTimeout(reject, 0, "rejected")`, WI.AuditTestCaseResult.Level.Error); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic-expected.txt b/LayoutTests/inspector/audit/basic-expected.txt >deleted file mode 100644 >index 79a2965155c126b61f522d2520f329818fc8a8f6..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/audit/basic-expected.txt >+++ /dev/null >@@ -1,133 +0,0 @@ >-Testing the basic functionality of audits. >- >- >-== Running test suite: Audit.Basic >--- Running test case: Audit.Basic.Boolean.True >-Testing value `true`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Boolean.False >-Testing value `false`... >-PASS: Result should be "fail". >- >--- Running test case: Audit.Basic.String.Pass >-Testing value `"pass"`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.String.Warn >-Testing value `"warn"`... >-PASS: Result should be "warn". >- >--- Running test case: Audit.Basic.String.Fail >-Testing value `"fail"`... >-PASS: Result should be "fail". >- >--- Running test case: Audit.Basic.String.Error >-Testing value `"error"`... >-PASS: Result should be "error". >- >--- Running test case: Audit.Basic.String.Unsupported >-Testing value `"unsupported"`... >-PASS: Result should be "unsupported". >- >--- Running test case: Audit.Basic.Object.Pass >-Testing value `{"level":"pass"}`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Object.Warn >-Testing value `{"level":"warn"}`... >-PASS: Result should be "warn". >- >--- Running test case: Audit.Basic.Object.Fail >-Testing value `{"level":"fail"}`... >-PASS: Result should be "fail". >- >--- Running test case: Audit.Basic.Object.Error >-Testing value `{"level":"error"}`... >-PASS: Result should be "error". >- >--- Running test case: Audit.Basic.Object.Unsupported >-Testing value `{"level":"unsupported"}`... >-PASS: Result should be "unsupported". >- >--- Running test case: Audit.Basic.Promise.Boolean.True >-Testing value `new Promise((resolve, reject) => resolve(true))`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Promise.String.Pass >-Testing value `new Promise((resolve, reject) => resolve("pass"))`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Promise.Object.Pass >-Testing value `new Promise((resolve, reject) => resolve({level: "pass"}))`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Async.Boolean.True >-Testing value `true`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Async.String.Pass >-Testing value `"pass"`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Async.Object.Pass >-Testing value `{"level":"pass"}`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Timeout.Pass >-Testing value `new Promise((resolve, reject) => setTimeout(resolve, 0, "pass"))`... >-PASS: Result should be "pass". >- >--- Running test case: Audit.Basic.Error.Undefined >-Testing value `undefined`... >-PASS: Result should be "error". >- errors: >- - Return value is not an object, string, or boolean >- >--- Running test case: Audit.Basic.Error.Null >-Testing value `null`... >-PASS: Result should be "error". >- errors: >- - Return value is not an object, string, or boolean >- >--- Running test case: Audit.Basic.Error.Number >-Testing value `42`... >-PASS: Result should be "error". >- errors: >- - Return value is not an object, string, or boolean >- >--- Running test case: Audit.Basic.Error.String >-Testing value `"foo"`... >-PASS: Result should be "error". >- errors: >- - Return string must be one of ["pass","warn","fail","error","unsupported"] >- >--- Running test case: Audit.Basic.Error.Object >-Testing value `{}`... >-PASS: Result should be "error". >- errors: >- - Missing result level >- >--- Running test case: Audit.Basic.Error.Variable >-Testing value `INVALID`... >-PASS: Result should be "error". >- errors: >- - ReferenceError: Can't find variable: INVALID >- >--- Running test case: Audit.Basic.Error.Promise.Resolved >-Testing value `new Promise((resolve, reject) => setTimeout(resolve, 0))`... >-PASS: Result should be "error". >- errors: >- - Return value is not an object, string, or boolean >- >--- Running test case: Audit.Basic.Error.Promise.Rejected >-Testing value `new Promise((resolve, reject) => setTimeout(reject, 0, "rejected"))`... >-PASS: Result should be "error". >- errors: >- - rejected >- >--- Running test case: Audit.Basic.Debugger >-Testing `debugger`... >-PASS: Should not pause on the debugger statement. >-PASS: Result should be "pass". >- >diff --git a/LayoutTests/inspector/audit/basic-object-expected.txt b/LayoutTests/inspector/audit/basic-object-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..d9e77a94303bc5d1da375bf279014a3617477a4d >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-object-expected.txt >@@ -0,0 +1,24 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.Object.Pass >+Testing value `{"level":"pass"}`... >+PASS: Result should be "pass". >+ >+-- Running test case: Audit.Basic.Object.Warn >+Testing value `{"level":"warn"}`... >+PASS: Result should be "warn". >+ >+-- Running test case: Audit.Basic.Object.Fail >+Testing value `{"level":"fail"}`... >+PASS: Result should be "fail". >+ >+-- Running test case: Audit.Basic.Object.Error >+Testing value `{"level":"error"}`... >+PASS: Result should be "error". >+ >+-- Running test case: Audit.Basic.Object.Unsupported >+Testing value `{"level":"unsupported"}`... >+PASS: Result should be "unsupported". >+ >diff --git a/LayoutTests/inspector/audit/basic-object.html b/LayoutTests/inspector/audit/basic-object.html >new file mode 100644 >index 0000000000000000000000000000000000000000..069f1158d2635f946d29bc6d548c57ba7ca1cdc7 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-object.html >@@ -0,0 +1,29 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Pass", {level: WI.AuditTestCaseResult.Level.Pass}, WI.AuditTestCaseResult.Level.Pass); >+ InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Warn", {level: WI.AuditTestCaseResult.Level.Warn}, WI.AuditTestCaseResult.Level.Warn); >+ InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Fail", {level: WI.AuditTestCaseResult.Level.Fail}, WI.AuditTestCaseResult.Level.Fail); >+ InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Error", {level: WI.AuditTestCaseResult.Level.Error}, WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Unsupported", {level: WI.AuditTestCaseResult.Level.Unsupported}, WI.AuditTestCaseResult.Level.Unsupported); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic-promise-expected.txt b/LayoutTests/inspector/audit/basic-promise-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..c8bfdb17f7ddc3d66ad9b6240cb220eb00778c7d >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-promise-expected.txt >@@ -0,0 +1,16 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.Promise.Boolean.True >+Testing value `new Promise((resolve, reject) => resolve(true))`... >+PASS: Result should be "pass". >+ >+-- Running test case: Audit.Basic.Promise.String.Pass >+Testing value `new Promise((resolve, reject) => resolve("pass"))`... >+PASS: Result should be "pass". >+ >+-- Running test case: Audit.Basic.Promise.Object.Pass >+Testing value `new Promise((resolve, reject) => resolve({level: "pass"}))`... >+PASS: Result should be "pass". >+ >diff --git a/LayoutTests/inspector/audit/basic-promise.html b/LayoutTests/inspector/audit/basic-promise.html >new file mode 100644 >index 0000000000000000000000000000000000000000..579e690fb3990b1a3d58f5f067936540d8b1d086 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-promise.html >@@ -0,0 +1,27 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ InspectorTest.Audit.addPromiseTest("Audit.Basic.Promise.Boolean.True", `resolve(true)`, WI.AuditTestCaseResult.Level.Pass); >+ InspectorTest.Audit.addPromiseTest("Audit.Basic.Promise.String.Pass", `resolve("${WI.AuditTestCaseResult.Level.Pass}")`, WI.AuditTestCaseResult.Level.Pass); >+ InspectorTest.Audit.addPromiseTest("Audit.Basic.Promise.Object.Pass", `resolve({level: "${WI.AuditTestCaseResult.Level.Pass}"})`, WI.AuditTestCaseResult.Level.Pass); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic-string-expected.txt b/LayoutTests/inspector/audit/basic-string-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..3d1d8463be02f47f097c3f926057b157436c42e9 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-string-expected.txt >@@ -0,0 +1,24 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.String.Pass >+Testing value `"pass"`... >+PASS: Result should be "pass". >+ >+-- Running test case: Audit.Basic.String.Warn >+Testing value `"warn"`... >+PASS: Result should be "warn". >+ >+-- Running test case: Audit.Basic.String.Fail >+Testing value `"fail"`... >+PASS: Result should be "fail". >+ >+-- Running test case: Audit.Basic.String.Error >+Testing value `"error"`... >+PASS: Result should be "error". >+ >+-- Running test case: Audit.Basic.String.Unsupported >+Testing value `"unsupported"`... >+PASS: Result should be "unsupported". >+ >diff --git a/LayoutTests/inspector/audit/basic-string.html b/LayoutTests/inspector/audit/basic-string.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b9accf34853ab84ed5c7d3969289d6cdcc9e6a48 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-string.html >@@ -0,0 +1,29 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ InspectorTest.Audit.addStringTest("Audit.Basic.String.Pass", WI.AuditTestCaseResult.Level.Pass, WI.AuditTestCaseResult.Level.Pass); >+ InspectorTest.Audit.addStringTest("Audit.Basic.String.Warn", WI.AuditTestCaseResult.Level.Warn, WI.AuditTestCaseResult.Level.Warn); >+ InspectorTest.Audit.addStringTest("Audit.Basic.String.Fail", WI.AuditTestCaseResult.Level.Fail, WI.AuditTestCaseResult.Level.Fail); >+ InspectorTest.Audit.addStringTest("Audit.Basic.String.Error", WI.AuditTestCaseResult.Level.Error, WI.AuditTestCaseResult.Level.Error); >+ InspectorTest.Audit.addStringTest("Audit.Basic.String.Unsupported", WI.AuditTestCaseResult.Level.Unsupported, WI.AuditTestCaseResult.Level.Unsupported); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic-timeout-expected.txt b/LayoutTests/inspector/audit/basic-timeout-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..da1e4937a8e1ced3b411e4e1ba0da3151579dd34 >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-timeout-expected.txt >@@ -0,0 +1,8 @@ >+Testing the basic functionality of audits. >+ >+ >+== Running test suite: Audit.Basic >+-- Running test case: Audit.Basic.Timeout.Pass >+Testing value `new Promise((resolve, reject) => setTimeout(resolve, 0, "pass"))`... >+PASS: Result should be "pass". >+ >diff --git a/LayoutTests/inspector/audit/basic-timeout.html b/LayoutTests/inspector/audit/basic-timeout.html >new file mode 100644 >index 0000000000000000000000000000000000000000..a2df605093d3114acfe6050a6f25ea84cbae835d >--- /dev/null >+++ b/LayoutTests/inspector/audit/basic-timeout.html >@@ -0,0 +1,25 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+if (window.internals) >+ window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >+ >+function test() >+{ >+ InspectorTest.debug(); >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >+ >+ InspectorTest.Audit.addPromiseTest("Audit.Basic.Timeout.Pass", `setTimeout(resolve, 0, "${WI.AuditTestCaseResult.Level.Pass}")`, WI.AuditTestCaseResult.Level.Pass); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Testing the basic functionality of audits.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/basic.html b/LayoutTests/inspector/audit/basic.html >deleted file mode 100644 >index 921a7410734328f3606c476d9c486c8eaa758dcb..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/audit/basic.html >+++ /dev/null >@@ -1,92 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >-<script src="resources/audit-utilities.js"></script> >-<script> >-if (window.internals) >- window.internals.settings.setUnhandledPromiseRejectionToConsoleEnabled(false); >- >-function test() >-{ >- let suite = InspectorTest.Audit.createSuite("Audit.Basic"); >- >- InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Boolean.True", true, WI.AuditTestCaseResult.Level.Pass); >- InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Boolean.False", false, WI.AuditTestCaseResult.Level.Fail); >- >- InspectorTest.Audit.addStringTest("Audit.Basic.String.Pass", WI.AuditTestCaseResult.Level.Pass, WI.AuditTestCaseResult.Level.Pass); >- InspectorTest.Audit.addStringTest("Audit.Basic.String.Warn", WI.AuditTestCaseResult.Level.Warn, WI.AuditTestCaseResult.Level.Warn); >- InspectorTest.Audit.addStringTest("Audit.Basic.String.Fail", WI.AuditTestCaseResult.Level.Fail, WI.AuditTestCaseResult.Level.Fail); >- InspectorTest.Audit.addStringTest("Audit.Basic.String.Error", WI.AuditTestCaseResult.Level.Error, WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addStringTest("Audit.Basic.String.Unsupported", WI.AuditTestCaseResult.Level.Unsupported, WI.AuditTestCaseResult.Level.Unsupported); >- >- InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Pass", {level: WI.AuditTestCaseResult.Level.Pass}, WI.AuditTestCaseResult.Level.Pass); >- InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Warn", {level: WI.AuditTestCaseResult.Level.Warn}, WI.AuditTestCaseResult.Level.Warn); >- InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Fail", {level: WI.AuditTestCaseResult.Level.Fail}, WI.AuditTestCaseResult.Level.Fail); >- InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Error", {level: WI.AuditTestCaseResult.Level.Error}, WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addObjectTest("Audit.Basic.Object.Unsupported", {level: WI.AuditTestCaseResult.Level.Unsupported}, WI.AuditTestCaseResult.Level.Unsupported); >- >- InspectorTest.Audit.addPromiseTest("Audit.Basic.Promise.Boolean.True", `resolve(true)`, WI.AuditTestCaseResult.Level.Pass); >- InspectorTest.Audit.addPromiseTest("Audit.Basic.Promise.String.Pass", `resolve("${WI.AuditTestCaseResult.Level.Pass}")`, WI.AuditTestCaseResult.Level.Pass); >- InspectorTest.Audit.addPromiseTest("Audit.Basic.Promise.Object.Pass", `resolve({level: "${WI.AuditTestCaseResult.Level.Pass}"})`, WI.AuditTestCaseResult.Level.Pass); >- >- InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Async.Boolean.True", true, WI.AuditTestCaseResult.Level.Pass, {async: true}); >- InspectorTest.Audit.addStringTest("Audit.Basic.Async.String.Pass", WI.AuditTestCaseResult.Level.Pass, WI.AuditTestCaseResult.Level.Pass, {async: true}); >- InspectorTest.Audit.addObjectTest("Audit.Basic.Async.Object.Pass", {level: WI.AuditTestCaseResult.Level.Pass}, WI.AuditTestCaseResult.Level.Pass, {async: true}); >- >- InspectorTest.Audit.addPromiseTest("Audit.Basic.Timeout.Pass", `setTimeout(resolve, 0, "${WI.AuditTestCaseResult.Level.Pass}")`, WI.AuditTestCaseResult.Level.Pass); >- >- InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Undefined", undefined, WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Null", null, WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Number", 42, WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addStringTest("Audit.Basic.Error.String", "foo", WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addObjectTest("Audit.Basic.Error.Object", {}, WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addFunctionlessTest("Audit.Basic.Error.Variable", "INVALID", WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addPromiseTest("Audit.Basic.Error.Promise.Resolved", `setTimeout(resolve, 0)`, WI.AuditTestCaseResult.Level.Error); >- InspectorTest.Audit.addPromiseTest("Audit.Basic.Error.Promise.Rejected", `setTimeout(reject, 0, "rejected")`, WI.AuditTestCaseResult.Level.Error); >- >- suite.addTestCase({ >- name: "Audit.Basic.Debugger", >- description: "Test that a debugger statement doesn't pause when running an audit.", >- test(resolve, reject) { >- const level = "pass"; >- let audit = new WI.AuditTestCase("Audit.Basic.Debugger", `function() { debugger; return "${level}"; }`); >- >- let paused = false; >- let pausedListener = WI.debuggerManager.singleFireEventListener(WI.DebuggerManager.Event.Paused, (event) => { >- paused = true; >- >- WI.debuggerManager.resume(); >- }); >- >- WI.auditManager.awaitEvent(WI.AuditManager.Event.TestCompleted).then((event) => { >- InspectorTest.expectFalse(paused, "Should not pause on the debugger statement."); >- >- let results = WI.auditManager.results.lastValue; >- InspectorTest.assert(results.length === 1, "There should be 1 result."); >- >- let result = results[0]; >- InspectorTest.assert(result instanceof WI.AuditTestCaseResult, "Result should be a WI.AuditTestCaseResult."); >- if (!result) >- return; >- >- InspectorTest.expectEqual(result.level, level, `Result should be "${level}".`); >- >- WI.debuggerManager.removeEventListener(WI.DebuggerManager.Event.Paused, pausedListener); >- }); >- >- InspectorTest.log("Testing `debugger`..."); >- >- WI.auditManager.start([audit]) >- .then(resolve, reject); >- }, >- }); >- >- suite.runTestCasesAndFinish(); >-} >-</script> >-</head> >-<body onload="runTest()"> >- <p>Testing the basic functionality of audits.</p> >-</body> >-</html> >diff --git a/LayoutTests/platform/mac-wk1/TestExpectations b/LayoutTests/platform/mac-wk1/TestExpectations >index 53658806710303b211507e8dae926eaa6843d844..38a5ea40eb5796766efebb0fbe83a7ebc7f5e4f7 100644 >--- a/LayoutTests/platform/mac-wk1/TestExpectations >+++ b/LayoutTests/platform/mac-wk1/TestExpectations >@@ -697,8 +697,6 @@ webkit.org/b/195098 pointerevents/mouse/over-enter-out-leave.html [ Failure ] > webkit.org/b/195098 pointerevents/mouse/pointer-capture.html [ Failure ] > webkit.org/b/195098 pointerevents/mouse/pointer-events-before-mouse-events.html [ Failure ] > >-webkit.org/b/196448 [ Debug ] inspector/audit/basic.html [ Pass Timeout ] >- > webkit.org/b/196502 media/video-background-tab-playback.html [ Pass Failure ] > > webkit.org/b/196915 [ Debug ] inspector/timeline/timeline-recording.html [ Pass Failure ] >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index 450afa49ea656a5000b07a72108453ab07e2dcdb..27b768ed4973215344cfd373081bdf7a2c754c18 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -928,8 +928,6 @@ webkit.org/b/196403 imported/w3c/web-platform-tests/mediacapture-record/MediaRec > > webkit.org/b/187391 accessibility/mac/async-increment-decrement-action.html [ Skip ] > >-webkit.org/b/196448 [ Debug ] inspector/audit/basic.html [ Pass Timeout ] >- > webkit.org/b/194164 http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-but-access-from-wrong-frame.html [ Pass Timeout ] > > webkit.org/b/195961 [ Debug ] imported/w3c/IndexedDB-private-browsing/idbobjectstore_createIndex7-event_order.html [ Pass Failure ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 196448
: 369698