| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/values.h" |
| 6 #include "extensions/browser/guest_view/test_guest_view_manager.h" |
| 7 #include "extensions/shell/test/shell_test.h" |
| 8 |
| 9 namespace content { |
| 10 class WebContents; |
| 11 } // namespace content |
| 12 |
| 13 namespace extensions { |
| 14 class TestGuestViewManager; |
| 15 |
| 16 // Base class for WebView tests in app_shell. |
| 17 class WebViewAPITest : public AppShellTest { |
| 18 protected: |
| 19 WebViewAPITest(); |
| 20 |
| 21 // Launches the app_shell app in |app_location|. |
| 22 void LaunchApp(const std::string& app_location); |
| 23 |
| 24 // Runs the test |test_name| in |app_location|. RunTest will launch the app |
| 25 // and execute the javascript function runTest(test_name) inside the app. |
| 26 void RunTest(const std::string& test_name, const std::string& app_location); |
| 27 |
| 28 // Starts/Stops the embedded test server. |
| 29 void StartTestServer(); |
| 30 void StopTestServer(); |
| 31 |
| 32 // Returns the GuestViewManager singleton. |
| 33 TestGuestViewManager* GetGuestViewManager(); |
| 34 |
| 35 // content::BrowserTestBase implementation. |
| 36 virtual void SetUpOnMainThread() override; |
| 37 virtual void TearDownOnMainThread() override; |
| 38 |
| 39 protected: |
| 40 content::WebContents* embedder_web_contents_; |
| 41 TestGuestViewManagerFactory factory_; |
| 42 base::DictionaryValue test_config_; |
| 43 }; |
| 44 |
| 45 } // namespace extensions |
| OLD | NEW |