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

Unified Diff: LayoutTests/inspector/console/console-tainted-globals.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
Index: LayoutTests/inspector/console/console-tainted-globals.html
diff --git a/LayoutTests/inspector/console/console-tainted-globals.html b/LayoutTests/inspector/console/console-tainted-globals.html
index 804c1186d64987e3cf477ca15634c328624aa944..8a3d9543f7517e91d51debdaeac7fc1b21210d92 100644
--- a/LayoutTests/inspector/console/console-tainted-globals.html
+++ b/LayoutTests/inspector/console/console-tainted-globals.html
@@ -72,15 +72,38 @@ function testThrowConstructorName()
return obj;
}
+function testOverriddenIsFinite()
+{
+ window.isFinite = throwGetter;
+ var out;
+ (function() {
+ out = arguments;
+ })("arg1", "arg2");
+ return out;
+}
+
function test()
{
InspectorTest.runTestSuite([
function evaluateInConsole(next)
{
- InspectorTest.evaluateInConsole("testOverriddenArrayPushAndMathMax()");
- InspectorTest.evaluateInConsole("testOverriddenConstructorName()");
- InspectorTest.evaluateInConsole("testThrowConstructorName()");
- InspectorTest.runAfterPendingDispatches(next);
+ var expressions = [
+ "testOverriddenArrayPushAndMathMax()",
+ "testOverriddenConstructorName()",
+ "testThrowConstructorName()",
+ "testOverriddenIsFinite()"
+ ];
+
+ function iterate()
+ {
+ var expr = expressions.shift();
+ if (!expr) {
+ InspectorTest.runAfterPendingDispatches(next);
+ return;
+ }
+ InspectorTest.evaluateInConsole(expr, iterate);
+ }
+ iterate();
},
function testRuntimeAgentCallFunctionOn(next)

Powered by Google App Engine
This is Rietveld 408576698