Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1237)

Unified Diff: webkit/data/layout_tests/chrome/fast/js/resources/js-test-pre.js

Issue 67225: Use null for default value of event handler attributes in XMLHttpRequest.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/data/layout_tests/chrome/fast/js/resources/js-test-pre.js
===================================================================
--- webkit/data/layout_tests/chrome/fast/js/resources/js-test-pre.js (revision 13843)
+++ webkit/data/layout_tests/chrome/fast/js/resources/js-test-pre.js (working copy)
@@ -83,6 +83,24 @@
function shouldBeFalse(_a) { shouldBe(_a, "false"); }
function shouldBeNaN(_a) { shouldBe(_a, "NaN"); }
+function shouldBeNull(_a)
+{
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (exception)
+ testFailed(_a + " should be null. Threw exception " + exception);
+ else if (_av == null)
+ testPassed(_a + " is null.");
+ else
+ testFailed(_a + " should be null. was " + _av);
+}
Pam (message me for reviews) 2009/04/16 21:59:31 function shouldBeNull() already exists in the real
+
function shouldBeUndefined(_a)
{
var exception;

Powered by Google App Engine
This is Rietveld 408576698