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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Window/element-constructors-to-string.html

Issue 1497503002: Removes the custom toString callback for the various DOM constructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h » ('j') | 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 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <script>
5 test(function() {
6 assert_equals(HTMLElement.toString(), "function HTMLElement() { [native code] }");
7 assert_equals(HTMLElement.toString, Function.prototype.toString);
8 }, "HTMLElement.toString should be Function.prototype.toString");
9
10 test(function() {
11 assert_equals(HTMLElement.toString.toString(), "function toString() { [n ative code] }");
12 assert_equals(HTMLElement.toString.toString, Function.prototype.toString );
13 }, "HTMLElement.toString.toString should be Function.prototype.toString");
14
15 HTMLElement.toString.toString = function() { return "foobar"; }
16
17 test(function() {
18 assert_equals(HTMLElement.toString.toString(), "foobar");
19 assert_equals(HTMLElement.toString(), "function HTMLElement() { [native code] }");
20 assert_equals(HTMLElement.toString, Function.prototype.toString);
21 }, "After changing HTMLElement.toString.toString, HTMLElement.toString shoul d still be Function.prototype.toString");
22
23 test(function() {
24 assert_equals(HTMLDivElement.toString.toString(), "foobar");
25 assert_equals(HTMLDivElement.toString(), "function HTMLDivElement() { [n ative code] }");
26 assert_equals(HTMLDivElement.toString, Function.prototype.toString);
27 }, "After changing HTMLElement.toString.toString, HTMLDivElement.toString sh ould still be Function.prototype.toString");
28 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698