Source/WebInspectorUI:
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Sep 2016 22:36:57 +0000 (22:36 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Sep 2016 22:36:57 +0000 (22:36 +0000)
commitead48adcb6c1a04e7ed2773f57d95fa82fd24e4b
tree70c633e73a55c2355cbddd4f3351cbfa7536c29e
parent2cdb6e99f0dd04bd2e928ba1679fee80f6076c52
Source/WebInspectorUI:
Web Inspector: Improve clarity of inspector tests by adding TestHarness.expect* functions similar to XCTest
https://bugs.webkit.org/show_bug.cgi?id=161278
<rdar://problem/28039741>

Reviewed by Joseph Pecoraro.

Under the hood they all call TestHarness.expectThat.

* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.expectFalse):
(TestHarness.prototype.expectNull):
(TestHarness.prototype.expectNotNull):
(TestHarness.prototype.expectEqual):
(TestHarness.prototype.expectNotEqual):
(TestHarness.prototype.expectShallowEqual):
(TestHarness.prototype.expectNotShallowEqual):
(TestHarness.prototype.expectEqualWithAccuracy):
(TestHarness.prototype.expectLessThan):
(TestHarness.prototype.expectLessThanOrEqual):
(TestHarness.prototype.expectGreaterThan):
(TestHarness.prototype.expectGreaterThanOrEqual):

LayoutTests:
Web Inspector: Add TestHarness assertions/expectations to provide additional semantics similar to XCTest
https://bugs.webkit.org/show_bug.cgi?id=161278
<rdar://problem/28039741>

Reviewed by Joseph Pecoraro.

Add test to verify that the TestHarness.expect* family of functions
trivially work. Since it isn't possible to verify the TestPage results
directly without introducing additional complexity, simply log baseline
"PASS" and "FAIL" results for each function.

* inspector/unit-tests/test-harness-expect-functions-expected.txt: Added.
* inspector/unit-tests/test-harness-expect-functions.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/unit-tests/test-harness-expect-functions-expected.txt [new file with mode: 0644]
LayoutTests/inspector/unit-tests/test-harness-expect-functions.html [new file with mode: 0644]
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Test/TestHarness.js