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

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: addressed comments 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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);
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698