| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 var options = consoleView._consoleContextSelector._selectElement.options
; | 933 var options = consoleView._consoleContextSelector._selectElement.options
; |
| 934 var values = []; | 934 var values = []; |
| 935 for (var i = 0; i < options.length; ++i) | 935 for (var i = 0; i < options.length; ++i) |
| 936 values.push(options[i].value.trim()); | 936 values.push(options[i].value.trim()); |
| 937 test.assertEquals("top", values[0]); | 937 test.assertEquals("top", values[0]); |
| 938 test.assertEquals("Simple content script", values[1]); | 938 test.assertEquals("Simple content script", values[1]); |
| 939 test.releaseControl(); | 939 test.releaseControl(); |
| 940 } | 940 } |
| 941 } | 941 } |
| 942 | 942 |
| 943 TestSuite.prototype.testDevToolsSharedWorker = function() |
| 944 { |
| 945 this.takeControl(); |
| 946 WebInspector.TempFile.ensureTempStorageCleared().then(() => this.releaseCont
rol()); |
| 947 } |
| 948 |
| 943 TestSuite.prototype.waitForTestResultsInConsole = function() | 949 TestSuite.prototype.waitForTestResultsInConsole = function() |
| 944 { | 950 { |
| 945 var messages = WebInspector.multitargetConsoleModel.messages(); | 951 var messages = WebInspector.multitargetConsoleModel.messages(); |
| 946 for (var i = 0; i < messages.length; ++i) { | 952 for (var i = 0; i < messages.length; ++i) { |
| 947 var text = messages[i].messageText; | 953 var text = messages[i].messageText; |
| 948 if (text === "PASS") | 954 if (text === "PASS") |
| 949 return; | 955 return; |
| 950 else if (/^FAIL/.test(text)) | 956 else if (/^FAIL/.test(text)) |
| 951 this.fail(text); // This will throw. | 957 this.fail(text); // This will throw. |
| 952 } | 958 } |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 /** | 1213 /** |
| 1208 * Key event with given key identifier. | 1214 * Key event with given key identifier. |
| 1209 */ | 1215 */ |
| 1210 TestSuite.createKeyEvent = function(key) | 1216 TestSuite.createKeyEvent = function(key) |
| 1211 { | 1217 { |
| 1212 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); | 1218 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); |
| 1213 }; | 1219 }; |
| 1214 | 1220 |
| 1215 window.uiTests = new TestSuite(window.domAutomationController); | 1221 window.uiTests = new TestSuite(window.domAutomationController); |
| 1216 })(window); | 1222 })(window); |
| OLD | NEW |