Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(969)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/Tests.js

Issue 2151573002: [DevTools] Fix window object init on chrome://* pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698