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

Side by Side Diff: LayoutTests/inspector/console/console-substituted.html

Issue 189723004: DevTools: console evaluation should work when window.console is overriden. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 function deleteConsole() 6 function deleteConsole()
7 { 7 {
8 window.console = undefined; 8 window.console = undefined;
9 } 9 }
10 10
11 function substituteConsole() 11 function substituteConsole()
12 { 12 {
13 window.console = { 13 Object.defineProperty(window, "__commandLineAPI", { enumerable: false, confi gurable: false, get: function() { throw "Substituted" }});
14 get _commandLineAPI() { return undefined; },
15 set _commandLineAPI() {}
16 };
17 } 14 }
18 15
19 var test = function() 16 var test = function()
20 { 17 {
21 InspectorTest.evaluateInConsole("deleteConsole()", step1); 18 InspectorTest.evaluateInConsole("deleteConsole()", step1);
22 19
23 function step1() 20 function step1()
24 { 21 {
25 InspectorTest.evaluateInConsole("1", step2); 22 InspectorTest.evaluateInConsole("1", step2);
26 } 23 }
(...skipping 20 matching lines...) Expand all
47 </head> 44 </head>
48 45
49 <body onload="runTest()"> 46 <body onload="runTest()">
50 <p> 47 <p>
51 Tests that evaluate in console works even if window.console is substituted or de leted. 48 Tests that evaluate in console works even if window.console is substituted or de leted.
52 <a href="https://bugs.webkit.org/show_bug.cgi?id=53072">Bug 53072</a> 49 <a href="https://bugs.webkit.org/show_bug.cgi?id=53072">Bug 53072</a>
53 </p> 50 </p>
54 51
55 </body> 52 </body>
56 </html> 53 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/console/console-native-function-to-string.html ('k') | Source/core/inspector/InjectedScriptSource.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698