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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: add basic postMessage test Created 5 years, 7 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
OLDNEW
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 "base/path_service.h" 5 #include "base/path_service.h"
6 #include "base/process/process.h" 6 #include "base/process/process.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/apps/app_browsertest_util.h" 10 #include "chrome/browser/apps/app_browsertest_util.h"
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 837
838 scoped_ptr<content::FakeSpeechRecognitionManager> 838 scoped_ptr<content::FakeSpeechRecognitionManager>
839 fake_speech_recognition_manager_; 839 fake_speech_recognition_manager_;
840 840
841 TestGuestViewManagerFactory factory_; 841 TestGuestViewManagerFactory factory_;
842 // Note that these are only set if you launch app using LoadAppWithGuest(). 842 // Note that these are only set if you launch app using LoadAppWithGuest().
843 content::WebContents* guest_web_contents_; 843 content::WebContents* guest_web_contents_;
844 content::WebContents* embedder_web_contents_; 844 content::WebContents* embedder_web_contents_;
845 }; 845 };
846 846
847 class WebViewSitePerProcessTest : public extensions::PlatformAppBrowserTest {
848 protected:
849 void SetUpCommandLine(base::CommandLine* command_line) override {
850 command_line->AppendSwitch(switches::kSitePerProcess);
Charlie Reis 2015/05/19 07:12:30 If you're doing this, you can use any try bot. Yo
lazyboy 2015/05/21 23:23:46 I've extracted the test to another CL: https://chr
851
852 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
853 }
854 };
855
847 class WebViewDPITest : public WebViewTest { 856 class WebViewDPITest : public WebViewTest {
848 protected: 857 protected:
849 void SetUpCommandLine(base::CommandLine* command_line) override { 858 void SetUpCommandLine(base::CommandLine* command_line) override {
850 WebViewTest::SetUpCommandLine(command_line); 859 WebViewTest::SetUpCommandLine(command_line);
851 command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, 860 command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor,
852 base::StringPrintf("%f", scale())); 861 base::StringPrintf("%f", scale()));
853 } 862 }
854 863
855 static float scale() { return 2.0f; } 864 static float scale() { return 2.0f; }
856 }; 865 };
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 // This test verifies that the allowtransparency attribute properly propagates 2713 // This test verifies that the allowtransparency attribute properly propagates
2705 IN_PROC_BROWSER_TEST_F(WebViewTest, AllowTransparencyAndAllowScalingPropagate) { 2714 IN_PROC_BROWSER_TEST_F(WebViewTest, AllowTransparencyAndAllowScalingPropagate) {
2706 LoadAppWithGuest("web_view/simple"); 2715 LoadAppWithGuest("web_view/simple");
2707 2716
2708 ASSERT_TRUE(GetGuestWebContents()); 2717 ASSERT_TRUE(GetGuestWebContents());
2709 extensions::WebViewGuest* guest = 2718 extensions::WebViewGuest* guest =
2710 extensions::WebViewGuest::FromWebContents(GetGuestWebContents()); 2719 extensions::WebViewGuest::FromWebContents(GetGuestWebContents());
2711 ASSERT_TRUE(guest->allow_transparency()); 2720 ASSERT_TRUE(guest->allow_transparency());
2712 ASSERT_TRUE(guest->allow_scaling()); 2721 ASSERT_TRUE(guest->allow_scaling());
2713 } 2722 }
2723
2724 IN_PROC_BROWSER_TEST_F(WebViewSitePerProcessTest, PostMessage) {
2725 ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages.
2726 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/post_message"))
2727 << message_;
2728 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698