OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/test/remoting/remote_desktop_browsertest.h" | 5 #include "chrome/test/remoting/remote_desktop_browsertest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/unpacked_installer.h" | 9 #include "chrome/browser/extensions/unpacked_installer.h" |
10 #include "chrome/browser/ui/extensions/application_launch.h" | 10 #include "chrome/browser/ui/extensions/application_launch.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // The active WebContents instance should be the source of the LOAD_STOP | 173 // The active WebContents instance should be the source of the LOAD_STOP |
174 // notification. | 174 // notification. |
175 content::NavigationController* controller = | 175 content::NavigationController* controller = |
176 content::Source<content::NavigationController>(observer.source()).ptr(); | 176 content::Source<content::NavigationController>(observer.source()).ptr(); |
177 | 177 |
178 content::WebContents* web_contents = controller->GetWebContents(); | 178 content::WebContents* web_contents = controller->GetWebContents(); |
179 if (web_contents != active_web_contents()) | 179 if (web_contents != active_web_contents()) |
180 web_contents_stack_.push_back(web_contents); | 180 web_contents_stack_.push_back(web_contents); |
181 | 181 |
182 if (is_platform_app()) { | 182 if (is_platform_app()) { |
183 EXPECT_EQ(GetFirstShellWindowWebContents(), active_web_contents()); | 183 EXPECT_EQ(GetFirstAppWindowWebContents(), active_web_contents()); |
184 } else { | 184 } else { |
185 // For apps v1 only, the DOMOperationObserver is not ready at the LOAD_STOP | 185 // For apps v1 only, the DOMOperationObserver is not ready at the LOAD_STOP |
186 // event. A half second wait is necessary for the subsequent javascript | 186 // event. A half second wait is necessary for the subsequent javascript |
187 // injection to work. | 187 // injection to work. |
188 // TODO(weitaosu): Find out whether there is a more appropriate notification | 188 // TODO(weitaosu): Find out whether there is a more appropriate notification |
189 // to wait for so we can get rid of this wait. | 189 // to wait for so we can get rid of this wait. |
190 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(5)).Wait()); | 190 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(5)).Wait()); |
191 } | 191 } |
192 | 192 |
193 EXPECT_EQ(Chromoting_Main_URL(), GetCurrentURL()); | 193 EXPECT_EQ(Chromoting_Main_URL(), GetCurrentURL()); |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 } | 706 } |
707 | 707 |
708 // static | 708 // static |
709 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( | 709 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( |
710 content::WebContents* web_contents) { | 710 content::WebContents* web_contents) { |
711 return ExecuteScriptAndExtractBool( | 711 return ExecuteScriptAndExtractBool( |
712 web_contents, "remoting.identity.isAuthenticated()"); | 712 web_contents, "remoting.identity.isAuthenticated()"); |
713 } | 713 } |
714 | 714 |
715 } // namespace remoting | 715 } // namespace remoting |
OLD | NEW |