Chromium Code Reviews| Index: chrome/test/remoting/pin_browsertest.cc |
| diff --git a/chrome/test/remoting/pin_browsertest.cc b/chrome/test/remoting/pin_browsertest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bdb3ebefafef8b7ac946b50e716a5d834a12b98d |
| --- /dev/null |
| +++ b/chrome/test/remoting/pin_browsertest.cc |
| @@ -0,0 +1,86 @@ |
| +// 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/file_util.h" |
| +#include "base/files/file_path.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_And_Reconnect) { |
| + VerifyInternetAccess(); |
| + |
| + Install(); |
| + |
| + LaunchChromotingApp(); |
| + |
| + Auth(); |
| + |
| + ExpandMe2Me(); |
| + |
| + content::WebContents* content = app_web_content(); |
| + |
| + LoadScript(content, FILE_PAHT_LITERAL("browser_test.js")); |
|
Jamie
2014/05/09 01:02:18
s/PAHT/PATH/ (here and elsewhere).
Does this comp
kelvinp
2014/05/12 21:08:34
Done.
|
| + LoadScript(content, FILE_PAHT_LITERAL("cancel_pin_browser_test.js")); |
|
Jamie
2014/05/09 01:02:18
These tests are identical to this point. Can you p
kelvinp
2014/05/12 21:08:34
Done.
|
| + RunJavaScriptTest(content, "Cancel_PIN", "{" |
| + "pin: '" + me2me_pin() + "'" |
| + "}"); |
| + |
| + Cleanup(); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_F(RemoteDesktopBrowserTest, |
| + MANUAL_Invalid_PIN) { |
| + VerifyInternetAccess(); |
| + |
| + Install(); |
| + |
| + LaunchChromotingApp(); |
| + |
| + Auth(); |
| + |
| + ExpandMe2Me(); |
| + |
| + content::WebContents* content = app_web_content(); |
| + LoadScript(content, FILE_PAHT_LITERAL("browser_test.js")); |
| + LoadScript(content, FILE_PAHT_LITERAL("invalid_pin_browser_test.js")); |
| + |
| + std::string pin = me2me_pin(); |
| + if (pin.length() == 0) { |
| + pin = "''"; |
| + } |
|
Jamie
2014/05/09 01:02:18
You're adding quotes anyway, so I don't think you
kelvinp
2014/05/12 21:08:34
Done.
|
| + |
| + RunJavaScriptTest(content, "Invalid_PIN", "{" |
| + "pin: '" + pin + "'" |
| + "}"); |
| + |
| + Cleanup(); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_F(RemoteDesktopBrowserTest, |
| + MANUAL_Update_PIN) { |
| + VerifyInternetAccess(); |
| + |
| + Install(); |
| + |
| + LaunchChromotingApp(); |
| + |
| + Auth(); |
| + |
| + ExpandMe2Me(); |
| + |
| + content::WebContents* content = app_web_content(); |
| + LoadScript(content, FILE_PAHT_LITERAL("browser_test.js")); |
| + LoadScript(content, FILE_PAHT_LITERAL("update_pin_browser_test.js")); |
| + RunJavaScriptTest(content, "Update_PIN", "{" |
| + "old_pin: '" + me2me_pin() + "'," |
| + "new_pin: '314159'" |
| + "}"); |
| + |
| + Cleanup(); |
| +} |
| + |
| +} // namespace remoting |