[ 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 Alex Christensen.

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:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@245257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f30a812..e3bc648 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,38 @@
 2019-05-13  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 Alex Christensen.
+
+        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-13  Devin Rousso  <drousso@apple.com>
+
         [ Mac WK2 ] Layout Test js/dom/unhandled-promise-rejection-bindings-type-error.html is a flaky failure
         https://bugs.webkit.org/show_bug.cgi?id=195969
         <rdar://problem/49039441>
diff --git a/LayoutTests/inspector/audit/basic-async-expected.txt b/LayoutTests/inspector/audit/basic-async-expected.txt
new file mode 100644
index 0000000..5391af4
--- /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 0000000..e2d194a
--- /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 0000000..341add0
--- /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 0000000..6b4e68b85
--- /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 0000000..ac4d1fd
--- /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 0000000..1744ed7
--- /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 0000000..2dc46fd
--- /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 0000000..f3782ec
--- /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 79a2965..0000000
--- 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 0000000..d9e77a9
--- /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 0000000..069f115
--- /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 0000000..c8bfdb1
--- /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 0000000..579e690
--- /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 0000000..3d1d846
--- /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 0000000..b9accf3
--- /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 0000000..da1e493
--- /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 0000000..a2df605
--- /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 921a741..0000000
--- 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 db86588..ae05f8a 100644
--- a/LayoutTests/platform/mac-wk1/TestExpectations
+++ b/LayoutTests/platform/mac-wk1/TestExpectations
@@ -693,8 +693,6 @@
 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 48990f2..f24cf11 100644
--- a/LayoutTests/platform/mac-wk2/TestExpectations
+++ b/LayoutTests/platform/mac-wk2/TestExpectations
@@ -929,8 +929,6 @@
 
 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/197068 [ Debug ] fast/selectors/matches-backtracking.html [ Pass Timeout ]