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

Side by Side Diff: LayoutTests/fast/dom/lenient-this.html

Issue 1182033002: bindings: Adds a layout test for [LenientThis] extended attribute. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>[LenientThis] test</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 test(function() {
7 // GlobalEventHandlers.onmouseenter is [LenientThis].
8 assert_equals(document.onmouseenter, null, "|this| is an appropriate object. ");
9 assert_equals(Document.prototype.onmouseenter, undefined, "|this| is not an appropriate object.");
10 Document.prototype.onmouseenter = 'foo'; // must not throw.
11 assert_equals(Document.prototype.onmouseenter, undefined, "the value must no t change.");
12
13 // GlobalEventHandlers.onmousedown is NOT [LenientThis].
14 assert_equals(document.onmousedown, null, "|this| is an appropriate object." );
15 assert_throws(null, function() {
16 Document.prototype.onmousedown;
17 }, "Document.prototype is invalid as |this|.");
18 assert_throws(null, function() {
19 Document.prototype.onmousedown = 'foo';
20 }, "Document.prototype is invalid as |this|.");
21 });
22 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698