| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 test.assertEquals("local", localSetting.get().s); | 906 test.assertEquals("local", localSetting.get().s); |
| 907 test.assertEquals(1, localSetting.get().n); | 907 test.assertEquals(1, localSetting.get().n); |
| 908 var globalSetting = WebInspector.settings.createSetting("global", undefi
ned, false); | 908 var globalSetting = WebInspector.settings.createSetting("global", undefi
ned, false); |
| 909 test.assertEquals("object", typeof globalSetting.get()); | 909 test.assertEquals("object", typeof globalSetting.get()); |
| 910 test.assertEquals("global", globalSetting.get().s); | 910 test.assertEquals("global", globalSetting.get().s); |
| 911 test.assertEquals(2, globalSetting.get().n); | 911 test.assertEquals(2, globalSetting.get().n); |
| 912 test.releaseControl(); | 912 test.releaseControl(); |
| 913 } | 913 } |
| 914 } | 914 } |
| 915 | 915 |
| 916 TestSuite.prototype.testWindowInitializedOnNavigateBack = function() |
| 917 { |
| 918 var messages = WebInspector.multitargetConsoleModel.messages(); |
| 919 this.assertEquals(1, messages.length); |
| 920 var text = messages[0].messageText; |
| 921 if (text.indexOf("Uncaught") !== -1) |
| 922 this.fail(text); |
| 923 }; |
| 924 |
| 916 TestSuite.prototype.waitForTestResultsInConsole = function() | 925 TestSuite.prototype.waitForTestResultsInConsole = function() |
| 917 { | 926 { |
| 918 var messages = WebInspector.multitargetConsoleModel.messages(); | 927 var messages = WebInspector.multitargetConsoleModel.messages(); |
| 919 for (var i = 0; i < messages.length; ++i) { | 928 for (var i = 0; i < messages.length; ++i) { |
| 920 var text = messages[i].messageText; | 929 var text = messages[i].messageText; |
| 921 if (text === "PASS") | 930 if (text === "PASS") |
| 922 return; | 931 return; |
| 923 else if (/^FAIL/.test(text)) | 932 else if (/^FAIL/.test(text)) |
| 924 this.fail(text); // This will throw. | 933 this.fail(text); // This will throw. |
| 925 } | 934 } |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 /** | 1179 /** |
| 1171 * Key event with given key identifier. | 1180 * Key event with given key identifier. |
| 1172 */ | 1181 */ |
| 1173 TestSuite.createKeyEvent = function(key) | 1182 TestSuite.createKeyEvent = function(key) |
| 1174 { | 1183 { |
| 1175 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); | 1184 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); |
| 1176 }; | 1185 }; |
| 1177 | 1186 |
| 1178 window.uiTests = new TestSuite(window.domAutomationController); | 1187 window.uiTests = new TestSuite(window.domAutomationController); |
| 1179 })(window); | 1188 })(window); |
| OLD | NEW |