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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html

Issue 1638953002: [DevTools] Migrate device-emulation tests from OverridesSupport to inspector-protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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) 2012 Samsung Electronics. All rights reserved. 2 Copyright (C) 2012 Samsung Electronics. 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 5 modification, are permitted provided that the following conditions
6 are met: 6 are met:
7 7
8 1. Redistributions of source code must retain the above copyright 8 1. 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 2. Redistributions in binary form must reproduce the above copyright 10 2. Redistributions in binary form must reproduce the above copyright
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 InspectorTest.log("Exception while running: " + func + "\n" + (e.sta ck || e)); 303 InspectorTest.log("Exception while running: " + func + "\n" + (e.sta ck || e));
304 if (onexception) 304 if (onexception)
305 InspectorTest.safeWrap(onexception)(); 305 InspectorTest.safeWrap(onexception)();
306 else 306 else
307 InspectorTest.completeTest(); 307 InspectorTest.completeTest();
308 } 308 }
309 } 309 }
310 return result; 310 return result;
311 } 311 }
312 312
313 InspectorTest.navigate = function(url, callback)
314 {
315 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);
316 InspectorTest.evaluateInPage("navigateProtocolTest('" + url + "')");
317 }
318
319 InspectorTest.pageReloaded = function()
320 {
321 InspectorTest.log("Page reloaded.");
322 var callback = InspectorTest._pageLoadedCallback;
323 delete InspectorTest._pageLoadedCallback;
324 if (callback)
325 callback();
326 }
327
313 var lastPromiseEvalId = 0; 328 var lastPromiseEvalId = 0;
314 var pendingPromiseEvalRequests = {}; 329 var pendingPromiseEvalRequests = {};
315 330
316 /** 331 /**
317 * The given function should take two callback paraters before the arguments: 332 * The given function should take two callback paraters before the arguments:
318 * * resolve - called when successful (with optional result) 333 * * resolve - called when successful (with optional result)
319 * * reject - called when there was a failure (with optional error) 334 * * reject - called when there was a failure (with optional error)
320 */ 335 */
321 InspectorTest.invokePageFunctionPromise = function(functionName, parameters) 336 InspectorTest.invokePageFunctionPromise = function(functionName, parameters)
322 { 337 {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 function enableInspectorAgent() 393 function enableInspectorAgent()
379 { 394 {
380 InspectorTest.sendCommand("Inspector.enable", { }); 395 InspectorTest.sendCommand("Inspector.enable", { });
381 } 396 }
382 397
383 window.addEventListener("load", enableInspectorAgent, false); 398 window.addEventListener("load", enableInspectorAgent, false);
384 399
385 </script> 400 </script>
386 </head> 401 </head>
387 </html> 402 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698