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

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: Added layout test 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/LayoutTests/fast/dom/Window/element-constructors-to-string-expected.txt » ('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 <html>
jochen (gone - plz use gerrit) 2015/12/03 11:41:42 should start with <!DOCTYPE html>
epertoso 2015/12/03 12:04:17 Done.
2 <body>
3 <p>Test that HTML element constructors' toString is just Function.prototype.toSt ring, and that changing &lt;HTML ELEMENT&gt;.toString.toString doesn't change th e output of &lt;HTML ELEMENT&gt;.toString().</p>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
jochen (gone - plz use gerrit) 2015/12/03 11:41:42 also 4sp indent in html/js
epertoso 2015/12/03 12:04:17 Done.
7
8 function test() {
9 document.write("<p>HTMLElement.toString(): " + window.HTMLElement.toString() + "</p>");
10 document.write("<p>HTMLElement.toString.toString(): " + window.HTMLElement.toS tring.toString() + "</p>");
11 document.write("<p>HTMLElement.toString === Function.prototype.toString: " + e val("HTMLElement.toString === Function.prototype.toString") + "</p>");
12
13 window.HTMLElement.toString.toString = function() { return "foobar"; }
14 document.write("<p>After setting HTMLElement.toString.toString to \"function() { return \"foobar\"; }\"</p>");
15
16 document.write("<p>HTMLElement.toString(): " + window.HTMLElement.toString() + "</p>");
17 document.write("<p>HTMLElement.toString.toString(): " + window.HTMLElement.toS tring.toString() + "</p>");
18 document.write("<p>HTMLElement.toString === Function.prototype.toString: " + e val("HTMLElement.toString === Function.prototype.toString") + "</p>");
19 document.write("<p>HTMLDivElement.toString(): " + window.HTMLDivElement.toStri ng() + "</p>");
20 document.write("<p>HTMLDivElement.toString.toString(): " + window.HTMLDivEleme nt.toString.toString() + "</p>");
21 }
22
23 test("HTMLElement");
jochen (gone - plz use gerrit) 2015/12/03 11:41:42 test() is declared without parameters
epertoso 2015/12/03 12:04:17 Now using testharness.js.
24
25 </script>
26 </body>
27 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Window/element-constructors-to-string-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698