Add long running gmail memory benchmark for background tab.
[chromium-blink-merge.git] / remoting / webapp / browser_test / invalid_pin_browser_test.js
blob1d08d1ab5ac56ecfe5f6de382842cdde569473ca
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 /**
6 * @fileoverview
7 * @suppress {checkTypes}
8 * Browser test for the scenario below:
9 * 1. Attempt to connect.
10 * 2. Enter |data.pin| at the PIN prompt.
11 * 3. Verify that there is connection error due to invalid access code.
14 'use strict';
16 /** @constructor */
17 browserTest.Invalid_PIN = function() {};
19 /**
20 * @param {{pin:string}} data
22 browserTest.Invalid_PIN.prototype.run = function(data) {
23 // Input validation.
24 browserTest.expect(typeof data.pin == 'string');
26 // Connect to me2me Host.
27 browserTest.connectMe2Me().then(function(){
28 return browserTest.enterPIN(data.pin, true)
29 }).then(
30 // Sleep for two seconds to allow the host backoff timer to reset.
31 base.Promise.sleep.bind(window, 2000)
32 ).then(function() {
33 // On fulfilled.
34 browserTest.pass();
35 }, function(reason) {
36 // On rejected.
37 browserTest.fail(reason);
38 });