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

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

Issue 639693005: Adding more webview browser tests to app_shell_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small changes are made. Created 6 years, 2 months 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
« no previous file with comments | « no previous file | extensions/browser/guest_view/web_view/web_view_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/values.h" 5 #include "base/values.h"
6 #include "extensions/browser/guest_view/test_guest_view_manager.h" 6 #include "extensions/browser/guest_view/test_guest_view_manager.h"
7 #include "extensions/shell/test/shell_test.h" 7 #include "extensions/shell/test/shell_test.h"
8 #include "ui/gfx/switches.h" 8 #include "ui/gfx/switches.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 12 matching lines...) Expand all
23 void LaunchApp(const std::string& app_location); 23 void LaunchApp(const std::string& app_location);
24 24
25 // Runs the test |test_name| in |app_location|. RunTest will launch the app 25 // Runs the test |test_name| in |app_location|. RunTest will launch the app
26 // and execute the javascript function runTest(test_name) inside the app. 26 // and execute the javascript function runTest(test_name) inside the app.
27 void RunTest(const std::string& test_name, const std::string& app_location); 27 void RunTest(const std::string& test_name, const std::string& app_location);
28 28
29 // Starts/Stops the embedded test server. 29 // Starts/Stops the embedded test server.
30 void StartTestServer(); 30 void StartTestServer();
31 void StopTestServer(); 31 void StopTestServer();
32 32
33 content::WebContents* GetEmbedderWebContents();
34
33 // Returns the GuestViewManager singleton. 35 // Returns the GuestViewManager singleton.
34 TestGuestViewManager* GetGuestViewManager(); 36 TestGuestViewManager* GetGuestViewManager();
35 37
38 content::WebContents* GetGuestWebContents();
39 void SendMessageToGuestAndWait(const std::string& message,
40 const std::string& wait_message);
41 void SendMessageToEmbedder(const std::string& message);
42
36 // content::BrowserTestBase implementation. 43 // content::BrowserTestBase implementation.
37 virtual void RunTestOnMainThreadLoop() override; 44 virtual void RunTestOnMainThreadLoop() override;
38 virtual void SetUpOnMainThread() override; 45 virtual void SetUpOnMainThread() override;
39 virtual void TearDownOnMainThread() override; 46 virtual void TearDownOnMainThread() override;
40 47
41 protected:
42 content::WebContents* embedder_web_contents_; 48 content::WebContents* embedder_web_contents_;
43 TestGuestViewManagerFactory factory_; 49 TestGuestViewManagerFactory factory_;
44 base::DictionaryValue test_config_; 50 base::DictionaryValue test_config_;
51
52 private:
53 content::WebContents* GetFirstAppWindowWebContents();
45 }; 54 };
46 55
47 class WebViewDPIAPITest : public WebViewAPITest { 56 class WebViewDPIAPITest : public WebViewAPITest {
48 protected: 57 protected:
49 virtual void SetUp() override; 58 virtual void SetUp() override;
50 static float scale() { return 2.0f; } 59 static float scale() { return 2.0f; }
51 }; 60 };
52 61
53 } // namespace extensions 62 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/guest_view/web_view/web_view_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698