summaryrefslogtreecommitdiffstats
path: root/chrome/test/remoting/pin_browsertest.cc
blob: 6f269cfa98307a1db3a8daff3776bc10b4b89a30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "chrome/test/remoting/remote_desktop_browsertest.h"
#include "chrome/test/remoting/waiter.h"

namespace remoting {

IN_PROC_BROWSER_TEST_F(RemoteDesktopBrowserTest, MANUAL_Cancel_PIN) {
  content::WebContents* content = SetUpTest();
  LoadScript(content, FILE_PATH_LITERAL("cancel_pin_browser_test.js"));

  RunJavaScriptTest(content, "Cancel_PIN", "{"
    "pin: '" + me2me_pin() + "'"
  "}");

  Cleanup();
}

IN_PROC_BROWSER_TEST_F(RemoteDesktopBrowserTest, MANUAL_Invalid_PIN) {
  content::WebContents* content = SetUpTest();
  LoadScript(content, FILE_PATH_LITERAL("invalid_pin_browser_test.js"));

  RunJavaScriptTest(content, "Invalid_PIN", "{"
    // Append arbitrary characters after the pin to make it invalid.
    "pin: '" + me2me_pin() + "ABC'"
  "}");

  Cleanup();
}

IN_PROC_BROWSER_TEST_F(RemoteDesktopBrowserTest, MANUAL_Update_PIN) {
  content::WebContents* content = SetUpTest();
  LoadScript(content, FILE_PATH_LITERAL("update_pin_browser_test.js"));

  RunJavaScriptTest(content, "Update_PIN", "{"
    "old_pin: '" + me2me_pin() + "',"
    "new_pin: '314159'"
  "}");

  Cleanup();
}

}  // namespace remoting