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

Unified Diff: LayoutTests/inspector/console/console-format-collections.html

Issue 470543002: DevTools: Don't allow native global functions in injected script. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-format-collections-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/console/console-format-collections.html
diff --git a/LayoutTests/inspector/console/console-format-collections.html b/LayoutTests/inspector/console/console-format-collections.html
index c354939072bf1c75c0576604d897dbdd5f16c074..07696e8d01ce101edc7bcc68de500b7146d6a1ac 100644
--- a/LayoutTests/inspector/console/console-format-collections.html
+++ b/LayoutTests/inspector/console/console-format-collections.html
@@ -53,6 +53,17 @@ function logToConsole()
// DOMTokenList
var div = document.getElementsByTagName("div")[0];
console.log(div.classList);
+
+ // Array-like's.
+ console.log(new ArrayLike(5));
+ console.log(new ArrayLike(0xFFFFFFFF));
+ // Array-like's with wrong length.
+ console.log(new ArrayLike(-5));
+ console.log(new ArrayLike(5.6));
+ console.log(new ArrayLike(NaN));
+ console.log(new ArrayLike(Infinity));
+ console.log(new ArrayLike(-0));
+ console.log(new ArrayLike(0xFFFFFFFF + 1));
}
function onload()
@@ -72,6 +83,12 @@ NonArrayWithLength.prototype.__defineGetter__("length", function()
return this.keys.length;
});
+function ArrayLike(length)
+{
+ this.length = length;
+}
+ArrayLike.prototype.splice = function() {};
+
function test()
{
InspectorTest.evaluateInPage("logToConsole()", callback);
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-format-collections-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698