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

Side by Side Diff: content/shell/layout_test_controller.js

Issue 10740002: Stub out not yet implemented controller methods, so we don't have to wait for timeouts but fail imm… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_shell.gypi ('k') | content/shell/layout_test_controller_bindings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var layoutTestController = layoutTestController || {}; 5 var layoutTestController = layoutTestController || {};
6 var testRunner = testRunner || {}; 6 var testRunner = testRunner || {};
7 var accessibilityController = accessibilityController || {};
8 var gamepadController = gamepadController || {};
9 var eventSender = eventSender || {};
10 var textInputController = textInputController || {};
7 11
8 (function() { 12 (function() {
9 native function NotifyDone(); 13 native function NotifyDone();
10 native function SetDumpAsText(); 14 native function SetDumpAsText();
11 native function SetDumpChildFramesAsText(); 15 native function SetDumpChildFramesAsText();
12 native function SetPrinting(); 16 native function SetPrinting();
13 native function SetShouldStayOnPageAfterHandlingBeforeUnload(); 17 native function SetShouldStayOnPageAfterHandlingBeforeUnload();
14 native function SetWaitUntilDone(); 18 native function SetWaitUntilDone();
15 19
16 layoutTestController = new function() { 20 native function NotImplemented();
17 this.notifyDone = NotifyDone;
18 this.dumpAsText = SetDumpAsText;
19 this.dumpChildFramesAsText = SetDumpChildFramesAsText;
20 this.setPrinting = SetPrinting;
21 this.setShouldStayOnPageAfterHandlingBeforeUnload =
22 SetShouldStayOnPageAfterHandlingBeforeUnload;
23 this.waitUntilDone = SetWaitUntilDone;
24 }();
25 21
26 testRunner = layoutTestController; 22 var DefaultHandler = function(name) {
23 var handler = {
24 get: function(receiver, property) {
25 return function() {
26 return NotImplemented(name, property);
27 }
28 }
29 }
30 return Proxy.create(handler);
31 }
27 32
33 var LayoutTestController = function() {
34 Object.defineProperty(this, "notifyDone", {value: NotifyDone});
35 Object.defineProperty(this, "dumpAsText", {value: SetDumpAsText});
36 Object.defineProperty(this,
37 "dumpChildFramesAsText",
38 {value: SetDumpChildFramesAsText});
39 Object.defineProperty(this, "setPrinting", {value: SetPrinting});
40 Object.defineProperty(
41 this,
42 "setShouldStayOnPageAfterHandlingBeforeUnload",
43 {value: SetShouldStayOnPageAfterHandlingBeforeUnload});
44 Object.defineProperty(this, "waitUntilDone", {value: SetWaitUntilDone});
45 }
46 LayoutTestController.prototype = DefaultHandler("layoutTestController");
47 layoutTestController = new LayoutTestController();
48 testRunner = new LayoutTestController();
49
50 var AccessibilityController = function() {}
51 AccessibilityController.prototype = DefaultHandler("accessibilityController");
52 accessibilityController = new AccessibilityController();
53
54 var GamepadController = function() {}
55 GamepadController.prototype = DefaultHandler("gamepadController");
56 gamepadController = new GamepadController();
57
58 var EventSender = function() {}
59 EventSender.prototype = DefaultHandler("eventSender");
60 eventSender = new EventSender();
61
62 var TextInputController = function() {}
63 TextInputController.prototype = DefaultHandler("textInputController");
64 textInputController = new TextInputController();
28 })(); 65 })();
OLDNEW
« no previous file with comments | « content/content_shell.gypi ('k') | content/shell/layout_test_controller_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698