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

Unified Diff: LayoutTests/http/tests/resources/testharness-helpers.js

Issue 667423005: Service Workers: Improve object equality assertion errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/cache-match-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/resources/testharness-helpers.js
diff --git a/LayoutTests/http/tests/resources/testharness-helpers.js b/LayoutTests/http/tests/resources/testharness-helpers.js
index 7626c94d6153755bb78b78f6ebb8e56bc5412afc..292e5f9953ec30c36731d045f504806c0b0c17bb 100644
--- a/LayoutTests/http/tests/resources/testharness-helpers.js
+++ b/LayoutTests/http/tests/resources/testharness-helpers.js
@@ -103,8 +103,12 @@ self.assert_object_equals = function(actual, expected, description) {
object_stack.pop();
}
+ function _brand(object) {
+ return Object.prototype.toString.call(object).match(/^\[object (.*)\]$/)[1];
+ }
+
_is_equal(actual, expected,
- (description ? description + ' :' : '') + '[object]');
+ (description ? description + ': ' : '') + _brand(actual));
};
// Equivalent to assert_in_array, but uses a weaker equivalence relation
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/cache-match-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698