Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_apitest.cc

Issue 642383003: Add the ability to load multiple apps into app_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "extensions/browser/guest_view/web_view/web_view_apitest.h" 5 #include "extensions/browser/guest_view/web_view/web_view_apitest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void WebViewAPITest::LaunchApp(const std::string& app_location) { 133 void WebViewAPITest::LaunchApp(const std::string& app_location) {
134 base::FilePath test_data_dir; 134 base::FilePath test_data_dir;
135 PathService::Get(DIR_TEST_DATA, &test_data_dir); 135 PathService::Get(DIR_TEST_DATA, &test_data_dir);
136 test_data_dir = test_data_dir.AppendASCII(app_location.c_str()); 136 test_data_dir = test_data_dir.AppendASCII(app_location.c_str());
137 137
138 test_config_.SetString(kTestDataDirectory, 138 test_config_.SetString(kTestDataDirectory,
139 net::FilePathToFileURL(test_data_dir).spec()); 139 net::FilePathToFileURL(test_data_dir).spec());
140 140
141 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); 141 embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
142 142
143 ASSERT_TRUE(extension_system_->LoadApp(test_data_dir)); 143 const Extension* extension = extension_system_->LoadApp(test_data_dir);
144 extension_system_->LaunchApp(); 144 ASSERT_TRUE(extension);
145 extension_system_->LaunchApp(extension->id());
145 146
146 ExtensionTestMessageListener launch_listener("LAUNCHED", false); 147 ExtensionTestMessageListener launch_listener("LAUNCHED", false);
147 ASSERT_TRUE(launch_listener.WaitUntilSatisfied()); 148 ASSERT_TRUE(launch_listener.WaitUntilSatisfied());
148 149
149 embedder_web_contents_ = GetFirstAppWindowWebContents(); 150 embedder_web_contents_ = GetFirstAppWindowWebContents();
150 } 151 }
151 152
152 content::WebContents* WebViewAPITest::GetFirstAppWindowWebContents() { 153 content::WebContents* WebViewAPITest::GetFirstAppWindowWebContents() {
153 const AppWindowRegistry::AppWindowList& app_window_list = 154 const AppWindowRegistry::AppWindowList& app_window_list =
154 AppWindowRegistry::Get(browser_context_)->app_windows(); 155 AppWindowRegistry::Get(browser_context_)->app_windows();
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 // object, on the webview element, and hanging directly off webview. 703 // object, on the webview element, and hanging directly off webview.
703 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebRequestAPIExistence) { 704 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebRequestAPIExistence) {
704 RunTest("testWebRequestAPIExistence", "web_view/apitest"); 705 RunTest("testWebRequestAPIExistence", "web_view/apitest");
705 } 706 }
706 707
707 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebRequestAPIGoogleProperty) { 708 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebRequestAPIGoogleProperty) {
708 RunTest("testWebRequestAPIGoogleProperty", "web_view/apitest"); 709 RunTest("testWebRequestAPIGoogleProperty", "web_view/apitest");
709 } 710 }
710 711
711 } // namespace extensions 712 } // namespace extensions
OLDNEW
« no previous file with comments | « athena/main/athena_main.cc ('k') | extensions/shell/browser/default_shell_browser_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698