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

Unified Diff: chrome/test/webdriver/test/bad_native_funcs.html

Issue 10829048: Update WebDriver atoms to pick up r17582. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | chrome/test/webdriver/test/chromedriver_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/test/bad_native_funcs.html
diff --git a/chrome/test/webdriver/test/bad_native_funcs.html b/chrome/test/webdriver/test/bad_native_funcs.html
new file mode 100644
index 0000000000000000000000000000000000000000..5feb2ea3aa56e16078484908cdb8a9929d0b3f52
--- /dev/null
+++ b/chrome/test/webdriver/test/bad_native_funcs.html
@@ -0,0 +1,42 @@
+<html>
+<script>
+ // JavaScript built-in types aren't enumerable.
+ var arrayFuncs = [
+ 'concat',
+ 'every',
+ 'filter',
+ 'forEach',
+ 'indexOf',
+ 'join',
+ 'lastIndexOf',
+ 'length',
+ 'map',
+ 'pop',
+ 'push',
+ 'reduce',
+ 'reduceRight',
+ 'reverse',
+ 'shift',
+ 'slice',
+ 'some',
+ 'sort',
+ 'splice',
+ 'unshift'];
+ for (var prop in arrayFuncs) {
+ Array.prototype[prop] = function() {
+ throw new Error('Array.prototype.' + prop + ' should not be called');
+ }
+ }
+ JSON.stringify = function() {
+ throw new Error('JSON.stringify should not be called');
+ }
+ JSON.parse = function() {
+ throw new Error('JSON.parse should not be called');
+ }
+</script>
+<body>
+<div>
+ Tests that no native functions are called by ChromeDriver.
+</div>
+</body>
+</html>
« no previous file with comments | « no previous file | chrome/test/webdriver/test/chromedriver_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698