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

Side by Side Diff: chrome/browser/cocoa/browser_window_controller_unittest.mm

Issue 341001: Disable fullscreen for Mstone-4 / ReleaseBlock-Beta. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/scoped_nsobject.h" 5 #include "base/scoped_nsobject.h"
6 #include "base/scoped_nsautorelease_pool.h" 6 #include "base/scoped_nsautorelease_pool.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/browser_window.h" 9 #include "chrome/browser/browser_window.h"
10 #include "chrome/browser/cocoa/browser_test_helper.h" 10 #include "chrome/browser/cocoa/browser_test_helper.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 virtual void TearDown() { 450 virtual void TearDown() {
451 [controller_ close]; 451 [controller_ close];
452 CocoaTest::TearDown(); 452 CocoaTest::TearDown();
453 } 453 }
454 454
455 public: 455 public:
456 BrowserTestHelper browser_helper_; 456 BrowserTestHelper browser_helper_;
457 BrowserWindowController* controller_; 457 BrowserWindowController* controller_;
458 }; 458 };
459 459
460 TEST_F(BrowserWindowFullScreenControllerTest, TestFullscreen) { 460 @interface BrowserWindowController (PrivateAPI)
461 - (BOOL)supportsFullscreen;
462 @end
463
464 // Fullscreen mode disabled for Mstone-4 / ReleaseBlock-Beta.
465 // Confirm we don't accidentally turn it back on.
466 TEST_F(BrowserWindowFullScreenControllerTest, ConfirmFullscreenDisabled) {
467 EXPECT_FALSE([controller_ supportsFullscreen]);
468 }
469
470 TEST_F(BrowserWindowFullScreenControllerTest, DISABLED_TestFullscreen) {
461 EXPECT_FALSE([controller_ isFullscreen]); 471 EXPECT_FALSE([controller_ isFullscreen]);
462 [controller_ setFullscreen:YES]; 472 [controller_ setFullscreen:YES];
463 EXPECT_TRUE([controller_ isFullscreen]); 473 EXPECT_TRUE([controller_ isFullscreen]);
464 [controller_ setFullscreen:NO]; 474 [controller_ setFullscreen:NO];
465 EXPECT_FALSE([controller_ isFullscreen]); 475 EXPECT_FALSE([controller_ isFullscreen]);
466 } 476 }
467 477
468 TEST_F(BrowserWindowFullScreenControllerTest, TestActivate) { 478 TEST_F(BrowserWindowFullScreenControllerTest, DISABLED_TestActivate) {
469 EXPECT_FALSE([controller_ isFullscreen]); 479 EXPECT_FALSE([controller_ isFullscreen]);
470 480
471 [controller_ activate]; 481 [controller_ activate];
472 NSWindow* frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0]; 482 NSWindow* frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0];
473 EXPECT_EQ(frontmostWindow, [controller_ window]); 483 EXPECT_EQ(frontmostWindow, [controller_ window]);
474 484
475 [controller_ setFullscreen:YES]; 485 [controller_ setFullscreen:YES];
476 [controller_ activate]; 486 [controller_ activate];
477 frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0]; 487 frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0];
478 EXPECT_EQ(frontmostWindow, [controller_ fullscreenWindow]); 488 EXPECT_EQ(frontmostWindow, [controller_ fullscreenWindow]);
(...skipping 15 matching lines...) Expand all
494 fullscreenWindow_.reset( 504 fullscreenWindow_.reset(
495 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400) 505 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400)
496 styleMask:NSBorderlessWindowMask 506 styleMask:NSBorderlessWindowMask
497 backing:NSBackingStoreBuffered 507 backing:NSBackingStoreBuffered
498 defer:NO]); 508 defer:NO]);
499 return fullscreenWindow_.get(); 509 return fullscreenWindow_.get();
500 } 510 }
501 @end 511 @end
502 512
503 /* TODO(???): test other methods of BrowserWindowController */ 513 /* TODO(???): test other methods of BrowserWindowController */
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698