This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<!-- PDF.js-specific --> | |
<script type="text/javascript" src="../../pdf.js"></script> | |
<script type="text/javascript" src="../../metrics.js"></script> | |
<script type="text/javascript" src="../../fonts.js"></script> | |
<script type="text/javascript" src="../../glyphlist.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | |
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ | |
// | |
// See README for overview | |
// | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void Search_ShouldReturn_CorrectRestaurantName_WithExplicitWait() | |
{ | |
_driver.Navigate().GoToUrl("http://www.bookatable.com/"); | |
// Find the search box and type some text | |
IWebElement searchBox = _driver.FindElement(By.Name("ddRestaurants")); | |
searchBox.Click(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void Search_ShouldReturn_CorrectRestaurantName_WithImplicitWait() | |
{ | |
_driver.Navigate().GoToUrl("http://www.bookatable.com/"); | |
// Find the search box and type some text | |
IWebElement searchBox = _driver.FindElement(By.Name("ddRestaurants")); | |
searchBox.Click(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void Search_ShouldReturn_CorrectRestaurantName() | |
{ | |
_driver.Navigate().GoToUrl("http://www.bookatable.com/"); | |
// Find the search box and type some text | |
IWebElement searchBox = _driver.FindElement(By.Name("ddRestaurants")); | |
searchBox.Click(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace WebWorkersExample.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
public ActionResult WebWorkers() | |
{ | |
return View(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> | |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Web Worker Example</title> | |
<script src="<%= Url.Content("~/scripts/modernizr-1.7.min.js") %>"></script> | |
</head> | |
<body> | |
<p>Result: <output id="result"></output></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = new XMLHttpRequest(); | |
request.open('POST', '/home/UpdateStats', false); | |
request.send(null); | |
if (request.status == 200) | |
postMessage(request.responseText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public JsonResult UpdateStats() | |
{ | |
Thread.Sleep(5000); | |
return Json("Success", JsonRequestBehavior.AllowGet); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void IndexAsync() | |
{ | |
AsyncManager.OutstandingOperations.Increment(2); | |
Task.Factory.StartNew(() => | |
{ | |
// Perform some expensive operation | |
string uri = "http://www.deanhume.com"; | |
WebClient client = new WebClient(); |
OlderNewer