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

Unified Diff: LayoutTests/media/track/opera/interfaces/TrackEvent/constructor.html

Issue 85263002: Improve handling of dictionary conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have conversion methods take a context argument; elaborate error msgs further. Created 7 years, 1 month 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: LayoutTests/media/track/opera/interfaces/TrackEvent/constructor.html
diff --git a/LayoutTests/media/track/opera/interfaces/TrackEvent/constructor.html b/LayoutTests/media/track/opera/interfaces/TrackEvent/constructor.html
index 475cbfd690016de4f7c74fb68e3bec03bdef9a76..6369beb9685d364587571cd5bd1b333dde683b4f 100644
--- a/LayoutTests/media/track/opera/interfaces/TrackEvent/constructor.html
+++ b/LayoutTests/media/track/opera/interfaces/TrackEvent/constructor.html
@@ -14,11 +14,17 @@ test(function(){
}, document.title+', one arg');
test(function(){
var obj = {};
- var ev = new TrackEvent('foo', {track:obj});
+ try {
+ var ev = new TrackEvent('foo', {track:obj});
+ assert_unreached("Expected constructor to throw TypeError");
+ } catch (e) {
+ assert_true(e instanceof TypeError);
+ }
+ var ev = new TrackEvent('foo', {});
assert_true(ev instanceof TrackEvent, 'ev instanceof TrackEvent');
assert_true(ev instanceof Event, 'ev instanceof Event');
- assert_equals(ev.track, obj, 'ev.track');
+ assert_equals(ev.track, null, 'ev.track');
ev.track = {};
- assert_equals(ev.track, obj, 'ev.track after assignment');
+ assert_equals(ev.track, null, 'ev.track after assignment');
}, document.title+', two args');
-</script>
+</script>

Powered by Google App Engine
This is Rietveld 408576698