| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 (function() { | 5 (function() { |
| 6 if (window.parent != window) // Ignore subframes. | 6 if (window.parent != window) // Ignore subframes. |
| 7 return; | 7 return; |
| 8 | 8 |
| 9 var domAutomationController = {}; | 9 var domAutomationController = {}; |
| 10 | 10 |
| 11 domAutomationController._succeeded = false; | 11 domAutomationController._succeeded = false; |
| 12 domAutomationController._finished = false; | |
| 13 | 12 |
| 14 domAutomationController.setAutomationId = function(id) {}; | 13 domAutomationController.setAutomationId = function(id) {}; |
| 15 | 14 |
| 16 domAutomationController.send = function(msg) { | 15 domAutomationController.send = function(msg) { |
| 17 domAutomationController._finished = true; | 16 msg = msg.toLowerCase(); |
| 18 | 17 if (msg == "success") |
| 19 if(msg.toLowerCase() == "success") { | |
| 20 domAutomationController._succeeded = true; | 18 domAutomationController._succeeded = true; |
| 21 } else { | 19 else |
| 22 domAutomationController._succeeded = false; | 20 domAutomationController._succeeded = false; |
| 23 } | |
| 24 }; | 21 }; |
| 25 | 22 |
| 26 window.domAutomationController = domAutomationController; | 23 window.domAutomationController = domAutomationController; |
| 27 })(); | 24 })(); |
| OLD | NEW |