| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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(window) { | 5 (function(window) { |
| 6 | 6 |
| 7 // DevToolsAPI ---------------------------------------------------------------- | 7 // DevToolsAPI ---------------------------------------------------------------- |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * @constructor | 10 * @constructor |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; | 817 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; |
| 818 window.document.head.appendChild(styleElement); | 818 window.document.head.appendChild(styleElement); |
| 819 } | 819 } |
| 820 | 820 |
| 821 function windowLoaded() | 821 function windowLoaded() |
| 822 { | 822 { |
| 823 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 823 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
| 824 installBackwardsCompatibility(); | 824 installBackwardsCompatibility(); |
| 825 } | 825 } |
| 826 | 826 |
| 827 if (window.document.readyState === "complete" || window.document.readyState ===
"interactive") | 827 if (window.document.head && (window.document.readyState === "complete" || window
.document.readyState === "interactive")) |
| 828 installBackwardsCompatibility(); | 828 installBackwardsCompatibility(); |
| 829 else | 829 else |
| 830 window.addEventListener("DOMContentLoaded", windowLoaded, false); | 830 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
| 831 | 831 |
| 832 // UITests ------------------------------------------------------------------ | 832 // UITests ------------------------------------------------------------------ |
| 833 | 833 |
| 834 if (window.domAutomationController) { | 834 if (window.domAutomationController) { |
| 835 var uiTests = {}; | 835 var uiTests = {}; |
| 836 | 836 |
| 837 uiTests._tryRun = function() | 837 uiTests._tryRun = function() |
| (...skipping 14 matching lines...) Expand all Loading... |
| 852 uiTests.testSuiteReady = function(testSuiteConstructor, testBase) | 852 uiTests.testSuiteReady = function(testSuiteConstructor, testBase) |
| 853 { | 853 { |
| 854 uiTests._testSuite = testSuiteConstructor(window.domAutomationController
); | 854 uiTests._testSuite = testSuiteConstructor(window.domAutomationController
); |
| 855 uiTests._tryRun(); | 855 uiTests._tryRun(); |
| 856 }; | 856 }; |
| 857 | 857 |
| 858 window.uiTests = uiTests; | 858 window.uiTests = uiTests; |
| 859 } | 859 } |
| 860 | 860 |
| 861 })(window); | 861 })(window); |
| OLD | NEW |