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

Unified Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm

Issue 987323002: [MacViews] Frameless app windows: make content view cover title bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test size of web contents, not content view. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm
index be99c163ba4ce921e29b4103357fb11ccd46e6c6..21c94971bc9e757cfab7acc88713945eadeb0b56 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm
@@ -213,3 +213,17 @@ IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, Fullscreen) {
EXPECT_FALSE(window->IsFullscreen());
EXPECT_FALSE([ns_window styleMask] & NSFullScreenWindowMask);
}
+
+// Test that, in frameless windows, the web contents has the same size as the
+// window.
+IN_PROC_BROWSER_TEST_F(NativeAppWindowCocoaBrowserTest, Frameless) {
+ extensions::AppWindow* app_window =
+ CreateTestAppWindow("{\"frame\": \"none\"}");
+ NSWindow* ns_window = app_window->GetNativeWindow();
+ NSView* web_contents = app_window->web_contents()->GetNativeView();
+ EXPECT_TRUE(NSEqualSizes([ns_window frame].size, [web_contents frame].size));
+ // Move and resize the window.
+ [ns_window setFrame:NSMakeRect(50, 50, 200, 200) display:YES];
tapted 2015/03/18 00:06:38 can you add a check that ensures this wasn't simpl
jackhou1 2015/03/18 03:44:39 Done.
+ EXPECT_TRUE(NSEqualSizes([ns_window frame].size, [web_contents frame].size));
+ CloseAppWindow(app_window);
+}
tapted 2015/03/18 00:06:38 I think there are some other things this CL fixes
jackhou1 2015/03/18 03:44:39 Done.

Powered by Google App Engine
This is Rietveld 408576698