| OLD | NEW |
| 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/strings/stringprintf.h" | 5 #include "base/strings/stringprintf.h" |
| 6 #include "chrome/browser/apps/app_browsertest_util.h" | 6 #include "chrome/browser/apps/app_browsertest_util.h" |
| 7 #include "chrome/browser/extensions/extension_test_message_listener.h" | 7 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 8 #include "chrome/test/base/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
| 9 #include "content/public/browser/notification_service.h" | 9 #include "content/public/browser/notification_service.h" |
| 10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 // GuestViewManager override: | 38 // GuestViewManager override: |
| 39 virtual void AddGuest(int guest_instance_id, | 39 virtual void AddGuest(int guest_instance_id, |
| 40 content::WebContents* guest_web_contents) OVERRIDE{ | 40 content::WebContents* guest_web_contents) OVERRIDE{ |
| 41 extensions::GuestViewManager::AddGuest( | 41 extensions::GuestViewManager::AddGuest( |
| 42 guest_instance_id, guest_web_contents); | 42 guest_instance_id, guest_web_contents); |
| 43 web_contents_ = guest_web_contents; | 43 web_contents_ = guest_web_contents; |
| 44 | 44 |
| 45 if (message_loop_runner_) | 45 if (message_loop_runner_.get()) |
| 46 message_loop_runner_->Quit(); | 46 message_loop_runner_->Quit(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 content::WebContents* web_contents_; | 49 content::WebContents* web_contents_; |
| 50 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; | 50 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // Test factory for creating test instances of GuestViewManager. | 53 // Test factory for creating test instances of GuestViewManager. |
| 54 class TestGuestViewManagerFactory : public extensions::GuestViewManagerFactory { | 54 class TestGuestViewManagerFactory : public extensions::GuestViewManagerFactory { |
| 55 public: | 55 public: |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 // Tests that <appview> correctly processes parameters passed on connect. | 162 // Tests that <appview> correctly processes parameters passed on connect. |
| 163 IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewGoodDataShouldSucceed) { | 163 IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewGoodDataShouldSucceed) { |
| 164 const extensions::Extension* skeleton_app = | 164 const extensions::Extension* skeleton_app = |
| 165 InstallPlatformApp("app_view/shim/skeleton"); | 165 InstallPlatformApp("app_view/shim/skeleton"); |
| 166 TestHelper("testAppViewGoodDataShouldSucceed", | 166 TestHelper("testAppViewGoodDataShouldSucceed", |
| 167 "app_view/shim", | 167 "app_view/shim", |
| 168 skeleton_app->id(), | 168 skeleton_app->id(), |
| 169 NO_TEST_SERVER); | 169 NO_TEST_SERVER); |
| 170 } | 170 } |
| OLD | NEW |