| 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 test.assertEquals("local", localSetting.get().s); | 892 test.assertEquals("local", localSetting.get().s); |
| 893 test.assertEquals(1, localSetting.get().n); | 893 test.assertEquals(1, localSetting.get().n); |
| 894 var globalSetting = WebInspector.settings.createSetting("global", undefi
ned, false); | 894 var globalSetting = WebInspector.settings.createSetting("global", undefi
ned, false); |
| 895 test.assertEquals("object", typeof globalSetting.get()); | 895 test.assertEquals("object", typeof globalSetting.get()); |
| 896 test.assertEquals("global", globalSetting.get().s); | 896 test.assertEquals("global", globalSetting.get().s); |
| 897 test.assertEquals(2, globalSetting.get().n); | 897 test.assertEquals(2, globalSetting.get().n); |
| 898 test.releaseControl(); | 898 test.releaseControl(); |
| 899 } | 899 } |
| 900 } | 900 } |
| 901 | 901 |
| 902 TestSuite.prototype.testWindowInitializedOnNavigateBack = function() |
| 903 { |
| 904 var messages = WebInspector.multitargetConsoleModel.messages(); |
| 905 this.assertEquals(1, messages.length); |
| 906 var text = messages[0].messageText; |
| 907 if (text.indexOf("Uncaught") !== -1) |
| 908 this.fail(text); |
| 909 }; |
| 910 |
| 902 TestSuite.prototype.waitForTestResultsInConsole = function() | 911 TestSuite.prototype.waitForTestResultsInConsole = function() |
| 903 { | 912 { |
| 904 var messages = WebInspector.multitargetConsoleModel.messages(); | 913 var messages = WebInspector.multitargetConsoleModel.messages(); |
| 905 for (var i = 0; i < messages.length; ++i) { | 914 for (var i = 0; i < messages.length; ++i) { |
| 906 var text = messages[i].messageText; | 915 var text = messages[i].messageText; |
| 907 if (text === "PASS") | 916 if (text === "PASS") |
| 908 return; | 917 return; |
| 909 else if (/^FAIL/.test(text)) | 918 else if (/^FAIL/.test(text)) |
| 910 this.fail(text); // This will throw. | 919 this.fail(text); // This will throw. |
| 911 } | 920 } |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 /** | 1165 /** |
| 1157 * Key event with given key identifier. | 1166 * Key event with given key identifier. |
| 1158 */ | 1167 */ |
| 1159 TestSuite.createKeyEvent = function(key) | 1168 TestSuite.createKeyEvent = function(key) |
| 1160 { | 1169 { |
| 1161 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); | 1170 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); |
| 1162 }; | 1171 }; |
| 1163 | 1172 |
| 1164 window.uiTests = new TestSuite(window.domAutomationController); | 1173 window.uiTests = new TestSuite(window.domAutomationController); |
| 1165 })(window); | 1174 })(window); |
| OLD | NEW |