callbackSpread.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. //
  6. //In theory this test could be race-y -- in which case suppress the console printing but in general ch should be well behaved
  7. //
  8. telemetryLog("Start Global Code", true);
  9. function foo1()
  10. {
  11. telemetryLog("Start Foo1", true);
  12. WScript.Echo("Hello World - CallBack 1");
  13. telemetryLog("End Foo1", true);
  14. }
  15. function foo2()
  16. {
  17. telemetryLog("Start Foo2", true);
  18. WScript.Echo("Hello World - CallBack 2");
  19. telemetryLog("End Foo2", true);
  20. }
  21. function foo3()
  22. {
  23. telemetryLog("Start Foo3", true);
  24. WScript.Echo("Hello World - CallBack 3");
  25. telemetryLog("End Foo3", true);
  26. emitTTDLog(ttdLogURI);
  27. }
  28. WScript.SetTimeout(foo1, 200);
  29. WScript.SetTimeout(foo2, 400);
  30. WScript.SetTimeout(foo3, 600);
  31. WScript.Echo("Hello World - Global");
  32. telemetryLog("End Global Code", true);